I am experiencing a minor issue...I have a button which is supposed to start a local .flv and loop it. However, there seems to be a small delay between the actual click and the flv starting to play. Here's the applicable code, is there anything wrong/can I do anything about that delay? The flv is small in size, should that matter at all.
Any help greatly appreciated, I clearly am a beginner in ActionScript 3.
var zapVidPlayer:VideoPlayer = new VideoPlayer(320, 430);
zapButton.addEventListener(MouseEvent.MOUSE_DOWN, zap);
zapVidPlayer.addEventListener(VideoEvent.COMPLETE, zapVidEnd);
function zap(event:MouseEvent):void {
addChild(zapVidPlayer);
zapVidPlayer.play("1.flv");
}
function zapVidEnd(event:VideoEvent):void {
zapVidPlayer.play("1.flv");
}