开发者

loop flv inside flash

开发者 https://www.devze.com 2023-02-05 22:38 出处:网络
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.

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

精彩评论

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