Reusing library items across Flash projects
What's the best way to re-use library elements across Flash projects. For instance, I 开发者_运维问答created a loading indicator Movie Clip that I want to re-use-
- Should I export it as a SWF, and then re-import it into other projects? (For some reason when I try this, the imported clip shows up but does not play in the new project? Why would this be?)
- Should I export as SWC?
- Should I 'Convert to Compiled Clip'?
Open the file you want to bring the library elements into. The select "File>Import>Open external library"
Select the file that has the elements you want to reuse. Only the library for that file opens.
Drag elements you want to use from the old to the new library.
Finished!
We have been using the following technique for the last couple of years and it works really well.
You create your assets as MovieClips in the library and compile to a swf. Each item in the library can be accessed in the app that loads the swf. It is managed by IMediaLibrary, check it out
http://lassieadventurestudio.wordpress.com/2008/09/05/runtime-class-extraction/
I recommend swc files. When you are coding using them, FlashDevelop and Flash Builder can read the Classes and symbols inside them and help with your code completion. While swf files can also be used this way, you do not get the benefit of code hinting as you develop new apps. Additionlly, your assets get compiled into your project swf, so there is no need to load them at runtime.
精彩评论