Seekbar Actionscript 3
H everyone, trying to get a seekbar to work in my youtube chromeless player in actionscript 3, I've tried to add it with this code but I'm getting a syntax error here: function player.seekTo(seconds:Number, allowSeekAhead:False):Void. The error is 1084: Syntax error: expecting leftparen before dot.
I've tried to work with the Youtube API on this but struggling to use their documentation to get it to work.
The only bit they have about a seek bar is this:
player.getClickToPlayButton(videoId:string, startSeconds:Number, suggestedQuality:String):DisplayObject- Creates and returns a thumbnail that functions as a click-to-play button for a video. The button is an extension of the player that issued it, and when the button is clicked, the player will play the associated video. This function, which is only supported in the Flash (AS3) Player API, provides the best way to trigger a video playback when a user clicks on a video thumbnail.
- The required
videoIdparameter identifies the video associated with the new button. The button is skinned with the video'shqdefaultthumbnail image. Since the button displays the video's thumbnail image, the application does not need to retrieve the video thumbnail image URLs using the YouTube Data API. - The optional
startSecondsparameter accepts a float/integer and specifies the time from which the video should start playing when the button is clicked. If specified, the video will start from the closest keyframe to the specified time. - The optional
suggestedQualityparameter specifies the suggested playback quality for the video. Please see the definition of thesetPlaybackQualityfunction for more information about playback quality.
- The required
I'm not even sure if I've added it correctly, can someone help me out? Thanks
Below is the code I've tried out:
player.seekBar = seekTo;
function player.seekTo(seconds:Number, allowSeekAhead:False):Void
{
if (player)
{
player.seekTo();
}
}
