This content has been marked as final. Show 6 replies
what's the point of packaging them together?
usually assets are NOT packaged because they are not all needed at the same time and loading the assets when needed minimizes the time required before assets can be presented to the user.
Thanks for the response kglad.
I agree that for most applications, loading assets as needed works fine. However, this won't work for our application.
The point of packaging the assets together is because they all need to be preloaded for the application to be properly responsive to the user. They do not all need to be displayed simultaneously, but they do need to be loaded in case they need to be displayed (based on user interaction). We cannot afford the delay of downloading images once the application is in use - we need instantaneous response.
then why have them separated from the main swf? add the files to your main swf or use shared library assets to include the needed files when your main swf loads.
The assets are located on a separate server and must be loaded at runtime. Each asset collection represents a separate presentation specified in an XML file. There are hundreds of these asset collections.
I'm not sure that shared library assets would work for us, since we don't know which asset collection will be used until runtime. As far as I know, the only way to make shared assets available is to drag them from the source document into the library of the destination document. Is there a way to specify at runtime which source document/assets you want to use?
yes, you can specify which assets to share at runtime. but you can't easily do this as an after-thought: your application should be created with this planned from the start.
in your situation with hundreds of swfs, i'm not sure what you can do. to use objects from a loaded swf's library, the objects need to have a linkage id and/or class assigned. and that's going to be a lot of work with that many swfs even if each only has one asset that's needed.
Thanks kglad. It seems that we are bumping up against the limitations of Flash for building complex applications (and not for the first time). I come from the Java world, where doing something like this would be a no-brainer. Claus Wahlers has developed an AS3 class to solve this very problem, but unfortunately we are restricted to AS2 at the moment.
Still, I'm surprised that no one else here has encountered this issue. For instance, someone who was writing a Flash video game that loads a new set of assets after each level cleared would need some way to do this.