lunedì, maggio 07, 2007

How to detect the end of a FLV

A neat tip that was originally found here.

// When the FLV is completed, go to the frame label End

var listenerObject:Object = new Object();

listenerObject.complete = function (eventObject:Object): Void{

_root.gotoAndPlay("End");

}

[FLV Instance Name].addEventListener("complete",listenerObject);