【问题标题】:Tell Target code (convert to as3)告诉目标代码(转换为 as3)
【发布时间】:2015-07-09 19:19:27
【问题描述】:

这是我在 AS2 中使用的代码

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

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

谢谢。

【问题讨论】:

    标签: actionscript-3 flash actionscript adobe


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-08
      • 2017-08-14
      • 2013-07-18
      • 1970-01-01
      • 2017-07-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多