这是我在AS2中使用的代码
on (release) {
tellTarget ("/incorrect")
{
nextFrame();
}
}
如何在 AS3 (AIR) 中执行此操作?
谢谢。
最佳答案
使用(root as MovieClip).something
代替tellTarget("/something")
。使用 addEventListener
代替 on (release) {
。
import flash.events.MouseEvent;
button.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void
{
(root as MovieClip).incorrect.nextFrame();
}
关于actionscript-3 - 告诉目标代码(转换为as3),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29961796/