PDA

View Full Version : myVideo.seek very slow!!!!



maxelcat
December 2nd, 2009, 07:44 AM
HI

I have an instance of the flvPlayBack component on my stage called myVideo (good eh?)

a list of links down the lhs is used to pop in the required video.

If a user gets say 1/3 of the way into a video and the presses a different link for a different video then:


the new video pops up but the seek bar is still some way into the new video
there is a pause of around 1 sec
the seek bar goes back to the start.

I want to speed up the return of the seek bar to the start of the new video.

Here's some code:



function clickHandler(event:MouseEvent):void {
this.myVideo.alpha=1;
if (linkType !="http"){
currentVideo =event.currentTarget.ref; //get url of current video
setVideoLinkEvents(currentVideo);
playVideo();
}else{
... stuff if its not a video link
}
}

function playVideo():void{
myVideo.source = vidLink[currentVideo];
myVideo.seek(0);
myVideo.pause(); //pause video - default opening state for videos
}



This might be wrong but do I need to somehow remove the reference to the "old" video before I set the source to the new one?

If that's junk - and it probably is ...

How can I speed the return of the seek bar to the start of the new video?

Thanks in advance

Edward

you can see this at http://www.ee-web.co.uk/arup/index004.html