currentFrame of root timeline from inside object

*爱你&永不变心* 提交于 2019-12-02 03:05:32

问题


Is it possible to pull the currentFrame of the root timeline from inside an object class? Normally a currentFrame call only checks the frame of the movieclip it's attached to within an object class, so how would you go about checking the frame of the entire project from within the object class file?

edit: Nevermind, I found what I was looking for. All you have to do is use MovieClip(root).currentFrame and it works just fine. Consider the question answered.


回答1:


Nevermind, I found what I was looking for. All you have to do is typecast root to MovieClip like this:

MovieClip(root).currentFrame


来源:https://stackoverflow.com/questions/6361838/currentframe-of-root-timeline-from-inside-object

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!