通过 jsfl 到场景中选定影片剪辑的完整路径
我尝试找到通过 jsfl 获取所选影片剪辑的完整路径的方法。
我有一个影片剪辑 mc1。在mc1内,我有第二个影片剪辑mc2。 如果我选择 mc2 并运行 jsfl 命令,我会尝试获取 mc2 的完整路径。
事情是:
root.mc1.mc2
我在symbolInstance中找不到像父属性这样的东西
I try to find the way to get full path to selected movieclip across jsfl.
I have one movieclip mc1. Inside mc1 i have the second movieclip mc2.
I try to get full path to mc2, if i select mc2 and run jsfl command.
Somthing that:
root.mc1.mc2
I cant't find some thng like parent property in symbolInstance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JSFL 中没有这样的类比,因为您必须考虑图层和帧的上下文,而不仅仅是实例(时间线)。
相反,您可以:
1 - 通过库路径访问/编辑剪辑
2 - 如果您在舞台上选择了 mc2 实例,则抓取库项目并进行编辑。
请注意,库项目“名称”实际上是库项目的完整路径,而不仅仅是您在库面板中看到的“名称”。
关于上下文,新的 xJSFL 框架有一个 Context 对象,旨在返回包含正确文档的 Context 对象、时间线、图层和框架。也许习惯了基本的 JSFL 语法,然后在熟悉后看看它。
希望有帮助。
There's not such an analogy in JSFL, as you have to take into account the context of layers and frames, not just instances (timelines).
Instead, you can either:
1 - access / edit the clip by the library path
2 - if you have the mc2 instance selected on stage, grab the library item, and edit that.
Note that the library item "name" is actually the full path to the library item, not just the "name" you see in the library panel.
With regards to context, the new xJSFL framework has a Context object, designed to return a Context object containing the correct document, timeline, layer & frame. Perhaps get used to basic JSFL syntax, then have a look at that once you're comfortable.
Hope that helps.