使用 JSFL AS3 CS5.5 访问子/嵌套影片剪辑
如何在 jsfl 中访问影片剪辑的子级(特别是子级影片剪辑)? 我已经处于实例级别 flash.documents[0].timelines[0].layers[0].frames[0].elements[0].instance 我找到了此文档,但没有找到太多其他内容。 提前致谢。
How can I access a movie clip's children (specifically child movie clips) in jsfl?
I am already at the instance level from
flash.documents[0].timelines[0].layers[0].frames[0].elements[0].instance
I've found this documentation but not much else.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 JSFL 中要记住的是,舞台上的元素也是库中的项目,因此无论嵌套多少次,它仍然是库中的剪辑,而且通常这就是您想要使用的内容。
在你的情况下,它会是:
一开始看起来确实违反直觉,但你很快就会习惯它。最简单的思考方式是,基本上所有元素都是“顶级”,因为它们都位于库中。
另外, fl.getDocumentDOM().getTimeline() 是获取当前文档和文档的常用方法。时间线。
The thing to remember in JSFL is that elements on stage are also items in the library, so it doesn't matter how many times you have something nested, it's still a clip in the library, and often that's the thing you want to work from.
In your case it would be:
It does seem counter-intuitive at first, but you soon get used to it. The easiest way to think about it is that essentially all elements are "top level" as they all live in the library.
Also, fl.getDocumentDOM().getTimeline() is the usual way to get the current document & timeline.