开发者

loop flv inside flash

I开发者_如何学Go'm new in Flash and I need to insert a flv into a new flash project and I want that video to play non-stop.

thanks


this is interesting, but if i use a smaller video, then the video is looping...


If you are using the FLVPlayback component, the code to loop your video should look like this:

import fl.video.VideoEvent;

/**
* Your code where you set the source and other properties of the FLVPlayback component
*/

//Add an event listener to the COMPLETE event, so you will know when the video reached the last frame
flvComp.addEventListener(VideoEvent.COMPLETE, loopVideo);

//Rewind and start playing the video again
function loopVideo(event:VideoEvent):void
{
    flvComp.autoRewind = true;
    flvComp.play();
};

I hope it helps, good luck Rob


here's an example with a looped flv, you need almost only NetConnection, NetStream and Video there

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜