开发者

Move movieclips to unique layers using JSFL

I have an asset file (FLA) that will be updated a lot by other team members during the project. I would like to have an JSFL script that moves all selected movieclips in the timeline to a ne开发者_JAVA技巧w layer (named using the movieclips library name).

  • Layer 0
    • instance88 (test1)
    • instance89 (test2)

... will become ...

  • test1
    • instance88
  • test2
    • instance89

Any suggestions?


If you name the test1 and test2 instances, you can right click them and select Distribute To Layers from the context menu, which should place the movieclips on separate layers, named after their instance names.

You could write a jsfl script, but you're requirements look a bit loose. The symbols names might change, could be more than 2 symbols with this behaviour, etc. At this point it might be more than trouble than it's worth.

Personally, I would use designer assets as named instances in a MovieClip with the Export for Actionscript option ticked all compiled into a single SWC. This way, you can simply access the assets by instance names from the linked SWC and use them via composition (or inheritance, depending on what's best suited for you) in your actionscript projects.

HTH

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜