Skip to main content
Poul_G7587782
Known Participant
July 21, 2008
Question

Loop HD stream? How...

  • July 21, 2008
  • 2 replies
  • 523 views

I found this great guide how to playback HD video in flash cs 3... The whole article is here :
http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player.html

And it shows some great examples and i got them to work quite perfect..
But there was no example of how to make the video loop (when it reaches the end..)

Can anybody help me?
This topic has been closed for replies.

2 replies

Damon Edwards
Inspiring
July 21, 2008
Rothrock is right, you need to listen for the 'complete' event if using the FLVPlayback component, like so:
flvPlayer.addEventListener(VideoEvent.COMPLETE, videoDone);
function videoDone(e:VideoEvent):void{
// do something
};

If you're using a NetStream/NetConnect combo, you'd do something like so:
ntConnection.addEventListener(NetStatusEvent.NET_STATUS, getStatus);
function getStatus(e:NetStatusEvent):void{
switch(e.info.code){
case "NetStream.Buffer.Flush":
// do something when data has finished streaming
break;
};
};
Inspiring
July 21, 2008
I'm not all up on it in AS3, but in AS2 you would just listen for the Complete event and then do what ever you wanted. I don't have the AS3 docs handy at the moment, but I would suggest checking the NetStream (and related) class for a similar event. There should be a code example.