【发布时间】:2015-07-09 19:19:27
【问题描述】:
这是我在 AS2 中使用的代码
on (release) {
tellTarget ("/incorrect")
{
nextFrame();
}
}
如何在 AS3 (AIR) 中执行此操作?
谢谢。
【问题讨论】:
标签: actionscript-3 flash actionscript adobe
这是我在 AS2 中使用的代码
on (release) {
tellTarget ("/incorrect")
{
nextFrame();
}
}
如何在 AS3 (AIR) 中执行此操作?
谢谢。
【问题讨论】:
标签: actionscript-3 flash actionscript adobe
使用(root as MovieClip).something 代替tellTarget("/something")。而不是on (release) { 使用addEventListener。
import flash.events.MouseEvent;
button.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void
{
(root as MovieClip).incorrect.nextFrame();
}
【讨论】: