告诉目标代码(转换为as3)

Tell Target code (convert to as3)

这是我在 AS2 中使用的代码

on (release) {
 tellTarget ("/incorrect")
 {
  nextFrame();
 }
}

如何在 AS3 (AIR) 中执行此操作?

谢谢。

使用 (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();
}