Animation seekTo usage

Trying to seek to a specific point on the main animation clip and pause. Not working yet.

api.getAnimations(function(err, animations) {
console.log(animations);
var firstAnimationUID = animations[0][0];
api.setCurrentAnimationByUID(firstAnimationUID);

                api.play(function(err){
                    api.seekTo(3,function(err){
                        api.pause();
                    });                   
                });  
            });

Thanks for the help!

you need to pause before seeking, otherwise it continues to play ?

I wonder if it was a loading issue. When I call the seekTo() function from a button it works fine. possibly this code is running before the animation has initialized.