Skip to main content
Known Participant
Oct 18, 2011 6:56 PM UTC
Question

Load assets?

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 is closed to new replies. Start a new post to keep the conversation going.

4 replies

Nimisha1
Participating Frequently
Oct 19, 2011 1:15 PM UTC

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.

Translate
Colin Holgate
Inspiring
Oct 19, 2011 1:21 PM UTC

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

Translate
Oct 18, 2011 8:04 PM UTC

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

Translate
Colin Holgate
Inspiring
Oct 18, 2011 8:23 PM UTC

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.

Translate