我有这个循环播放的 flv 视频,并且我有一个在电影运行时播放的随机电影。我需要在播放另一部电影时将shaker
其禁用或停止该随机循环。谢谢
ns.addEventListener(NetStatusEvent.NET_STATUS, NCListener);
function NCListener(e:NetStatusEvent){
if (e.info.code == "NetStream.Play.Stop") {
ns.play("video_2.flv");
shaker(null);
}
};
addEventListener(Event.COMPLETE,shaker);
function shaker (event:Event):void{
var mcArray:Array = [loader.button_01_mc,loader.button_02_mc,loader.button_03_mc,loader.button_04_mc,loader.button_05_mc];
var clipTimer:Timer = new Timer(4000);
clipTimer.addEventListener(TimerEvent.TIMER, playClips);
function playClips(event:TimerEvent):void{
var i:Number=Math.floor(Math.random() * mcArray.length);
var movieClipToEdit:MovieClip=mcArray[i] as MovieClip;
movieClipToEdit.gotoAndPlay (1);
}
clipTimer.start();
}
loader.button_01.addEventListener(MouseEvent.CLICK, play_video_01);
loader.button_01.addEventListener(MouseEvent.ROLL_OVER, play_effect_01);
function play_video_01 (event:MouseEvent){
ns.play("video_3.flv");
loader.button_01_mc.gotoAndPlay (41);