Flash AS3: FLVPlayback component, onComplete
// create an event listener for a FLV Playback Component
// FLVPlayback component has an instance name of: myFLVplayer
// FLVPlayback component is located in a movieclip: myMovie_mc
// listens for when the video has completed playing
// “rewinds” it to the beginning of the footage and plays it again…
import fl.video.*;//import fl.video.FLVPlayback;myMovie_mc.myFLVplayer.addEventListener(VideoEvent.COMPLETE, donePlaying);
function donePlaying(e:VideoEvent):void {
// trace(“myFLVplayer has stopped playing, rewinding video to beginning.”);
myMovie_MC.myFLVplayer.seek(0);
myMovie_MC.myFLVplayer.play();
}
This post is tagged: actionscript, code, flash