Skip to main content
Known Participant
October 18, 2011
Question

Load assets?

  • October 18, 2011
  • 2 replies
  • 472 views

I am using flash builder to make an app for android/ios.

How would you recommend I use assets such as images and sounds. Should I embed them or use loader?

Any benefits to each one.

I have a fair amount of assets.

This topic has been closed for replies.

2 replies

Nimisha1
Participating Frequently
October 19, 2011

When you embed an asset, you compile it into your application’s SWF file. The advantage of embedding an asset is that it is included in the SWF file, and can be accessed faster than it can if the application has to load it from a remote location at run time. The disadvantage of embedding an asset is that your SWF file is larger than if you load the asset at run time.

Colin Holgate
Inspiring
October 19, 2011

If the asset is in the package, that's just as local as if it was inside the swf, so it does load quickly.

October 18, 2011

I generally organize all my assets in CS5 (or CS5.5) and export a swf and swc file(with linkage names defined)  and load that at run time (not merged into code).

This is older but still a good explanation:

http://jansensan.net/loading-assets-dynamically-part-2

Colin Holgate
Inspiring
October 18, 2011

Are you sure that would work with iOS, which doesn't permit loading of external files that have code in them?

For just images, you can load the external files with a Loader very easily, so if they don't have to be loaded up front, then doing a normal Loader might be easiest.