我有这个:
123456789ABCDEF动作2..........o___Xa________Xo
Action.............a___X
Juego.............o_________oxxxX
Niveles...........o____oxxxX
Presentacion..oxxxX
"Action“frame1中的脚本如下所示:
stop();
stage.addEventListener(MouseEvent.CLICK, gotoNiveles);
function gotoNiveles(event:MouseEvent):void
{
trace("goto frame 6");
gotoAndStop(6);
/* line added to do it work properly
stage.removeEventListener(MouseEvent.CLICK, gotoNiveles);
*/
}"Action2“frame6中的脚本如下所示:
nivelButton1.addEventListener(MouseEvent.CLICK, gotoNivel1);
function gotoNivel1(event:MouseEvent):void
{
trace("goto frame 11");
gotoAndPlay(11);
navigateToURL(new URLRequest("http://www.technotupper.com"), "_blank");
}它显示:
它打开"www.technotupper.com",但是它不能工作,因为它不是显示框架11,而是返回到框架6和显示框架6。
谢谢。
巴勃罗。
发布于 2014-05-08 18:39:04
必须移除舞台上的鼠标单击事件。
只需在"stage.removeEventListener(MouseEvent.CLICK,gotoNiveles)“之后加上”gotoAndStop(6)“;
我把它加起来就像对这个问题的评论。
https://stackoverflow.com/questions/23524556
复制相似问题