我收到错误1120 access of undefined property on
knop_stop.addEventListener(MouseEvent.CLICK,stopVideos);
我想要9个按钮,播放视频。当一个视频被触发时,会出现一个退出视频的按钮,因此当您按下另一个按钮时可以播放另一个视频。
import fl.video.*;
import flash.events.MouseEvent;
stop();
knop_1.addEventListener(MouseEvent.CLICK,speel1);
knop_2.addEventListener(MouseEvent.CLICK,speel2);
knop_3.addEventListener(MouseEvent.CLICK,speel3);
knop_4.addEventListener(MouseEvent.CLICK,speel4);
knop_5.addEventListener(MouseEvent.CLICK,speel5);
knop_6.addEventListener(MouseEvent.CLICK,speel6);
knop_7.addEventListener(MouseEvent.CLICK,speel7);
knop_8.addEventListener(MouseEvent.CLICK,speel8);
knop_9.addEventListener(MouseEvent.CLICK,speel9);
knop_stop.addEventListener(MouseEvent.CLICK,stopVideos);
knop_stop.visible=false;
var videoArray:Array = new Array(
"video/video01.flv",
"video/video02.flv",
"video/video03.flv",
"video/video04.flv",
"video/video05.flv",
"video/video06.flv",
"video/video07.flv",
"video/video08.flv",
"video/video09.flv"
);
var filmAan = false;
function speel1(evtObj:MouseEvent):void {
trace("knop 1: video 1");
if (filmAan == false) {
var myVideo1:FLVPlayback = new FLVPlayback();
myVideo1.source = videoArray[0];
addChild(myVideo1);
myVideo1.x=340;
myVideo1.y=227;
myVideo1.width=1360;
myVideo1.height=908;
filmAan = true;
knop_stop.visible=true;
function stopVideos(evtObj:MouseEvent):void {
removeChild(myVideo1);
}
} else {
knop_stop.visible = false;
}
}
我做错了什么?