I got some help before getting my video set up, however I was unable to get it
to loop.
There is a fairly clear example on the Adobe website in the Flash 8 docs,
however it doesn't seem to work. What I get is the FLV icon flashing
repeatedly. I had to modify the example slightly for ActionScript 3. (see below)
Maybe what I'm doing is totally wrong :) any advice would be appreciated!
(taken from
http://livedocs.adobe.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?con
text=LiveDocs_Parts&file=00003477.html and modified to have a void instead of
Void)
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):void {
my_FLVPlybk.play();
};
my_FLVPlybk.addEventListener("complete", listenerObject);
That said, I would perhaps try calling my_FLVPlybk.rewind() before calling the
play() function in your complete.
Another method would be to set the autoRewind attribute of the FLVPlayback
component to true (this automatically rewinds the video on completion) and
watch for the rewind event, calling the play in there. This would look
something like:
(I'm not sure this is accurate, but you should be able to use it as a starting
point. This is also AS2 code, as I don't know AS3 very well. I am pretty sure
there would be more differences than just the Void->void in this code to make
it AS3)
my_FLVPlybk.autoRewind = true;
var listener:Object = new Object();
listener.rewind = function(evt:Event):Void {
my_FLVPlybk.play();
}
my_FLVPlybk.addEventListener("rewind",listener);