Search code examples
flashactionscript-3actionscriptflash-cs3

Flash, ActionScript: Load assets from external SWF


We have a widget (SWF) that needs to be broken into two SWFs. The main SWF will contain all the programming and business logic and it will also load a second SWF file which will contain the assets, fonts etc.

I have limited experience in Flash but I know it can be done in Flex. Anyway here we have to do it in Flash CS3. Will it be possible to do this in Flash? If yes, what are the steps we need to follow?

Thanks, Sri


Solution

  • Have a look at the Loader class. Code can be simpler than the one in the Example, but it's a start. There is a well explained tutorial on the flashandmath.com website.

    In you main fla ( with logic ), create a Loader, tell it to load the assets, on Event.INIT, use the assets.