Extracting the asset from the SWF file?

advertisements

As I am building a Flex framework for minigames, I plan to bundle a bunch of graphic assets (movieclip symbols) into a single swf file, which I will load into my Flex application, before extracting the symbols from the swf file for use in my application. My question is this: how do I do this through actionscript?

Thanks!


If you don't want to use EMBED and you don't want to load the assets on runtime I recommend you exporting the swf as an SWC.

This way, you can browse SWC files from actionscript. You can event check on compile time that a sub-movieclip inside another movieclip exists.

If you are using flex compiler then remember adding this when you compile:

-library-path C:\path\to\your\file.swc

If you're using FDT you have an option to auto add the SWC as arguments.

Here's a demo on how to do it with FDT. Not sure which tool are you using. If it's the commercial Flex Builder the process should be similar.

I think that's what you're looking for.