使用as3在第二帧上添加影片剪辑 [英] add movie clip on the second frame with as3

查看:117
本文介绍了使用as3在第二帧上添加影片剪辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用在AS3的类中调用的addChild在特定帧上添加影片剪辑, 我的问题是如何访问特定框架

how can i add a movie clip on a specific frame using addChild called in a class with AS3 , my problem is how access to the specific frame

谢谢

推荐答案

棘手的事情是处理帧实时循环" ...

The tricky thing about this would be to handle the frame 'live cycle'...

我要这样做的方式是:

  • FRAME_CONSTRUCTED 添加事件监听器
  • 发送动画片段并将其停在所需的帧上.
  • 将符号附加到事件的处理程序上.
  • Add an event listener for FRAME_CONSTRUCTED
  • Send your movieclip and stop it at your desired frame.
  • Attach your symbol on the handler of the event.

类似这样的东西:

mc.addEventListener(Event.FRAME_CONSTRUCTED, _addChild );
mc.gotoAndStop(2);
function _addChild(e:Event):void{
    mc.addChild( new Square) //Library symbol

}

这篇关于使用as3在第二帧上添加影片剪辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆