FLASH AS3.0 按钮事件函数定义重复?
场景一有按钮button1控制mc1播放button1.addEventListener(MouseEvent.CLICK,onButClick);functiononB...
场景一有 按钮button1 控制 mc1 播放
button1.addEventListener(MouseEvent.CLICK,onButClick);
function onButClick(e:MouseEvent):void{
mc1.gotoAndPlay(2);//
}
场景二有 按钮button2 控制 mc2 播放
button2.addEventListener(MouseEvent.CLICK,onButClick);
function onButClick(e:MouseEvent):void{
mc2.gotoAndPlay(2);//
}
单独测试场景没问题,整个导出就显示函数定义重复,不知道哪里重复了。。。。
button3.addEventListener(MouseEvent.MOUSE_DOWN,mousedown);
function mousedown(ev:MouseEvent)
{
gotoAndPlay(1,"场景 3");
}
button4.addEventListener(MouseEvent.MOUSE_DOWN,mousedown);
function mousedown(ev:MouseEvent)
{
gotoAndPlay(1,"场景 5");
}
同样的不同场景中的这2个按钮也显示函数定义重复 展开
button1.addEventListener(MouseEvent.CLICK,onButClick);
function onButClick(e:MouseEvent):void{
mc1.gotoAndPlay(2);//
}
场景二有 按钮button2 控制 mc2 播放
button2.addEventListener(MouseEvent.CLICK,onButClick);
function onButClick(e:MouseEvent):void{
mc2.gotoAndPlay(2);//
}
单独测试场景没问题,整个导出就显示函数定义重复,不知道哪里重复了。。。。
button3.addEventListener(MouseEvent.MOUSE_DOWN,mousedown);
function mousedown(ev:MouseEvent)
{
gotoAndPlay(1,"场景 3");
}
button4.addEventListener(MouseEvent.MOUSE_DOWN,mousedown);
function mousedown(ev:MouseEvent)
{
gotoAndPlay(1,"场景 5");
}
同样的不同场景中的这2个按钮也显示函数定义重复 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询