[web] Caching dynamicaly loaded movies

Started by
-1 comments, last by PaulCesar 16 years, 9 months ago
Hello, I have a problem that has been stressing me out a bit over the past few days, and hopefully one of you knows a thing or two about this and can help me out a bit. I have a Flex2 application which is going to be hosted on a webserver. It makes extensive use of images and movies (all AS3), which are DYNAMICALY loaded into the project. Sounds simple enough. But the thing is, some of these movies I will want many many instances of (complex partical effects for instance), and are rather large (have sound effects attached). First off I remembered from older flash applications the concept of "movie instances", but alo and behold, it doesent SEEM to work that way. If I use the Loader() object to get a MovieClip, I have to get another loader object to get another instance of the MovieClip, requiring a seperate load(). If Flash9 caches these, that wouldent be a problem, but for the looks of things it doesent, and with all the resources the end application will load, it would probably be way over the amount of caching I want So my programmer instinct kicks in. Build a resource loader implementing the caching myself. So I sat down to write one.... then I hit a brick wall... Cloning the MovieClips , DisplayObjects, etc... seems neh impossiable. Looking on the web I saw a potential solution in ByteArray, but that doesent work with DisplayObjects or movies. And accessing the bitmap data and "drawing" it on another sprite doesent work either because most of these elements are movie clips themselves, and hence more then a simple bitmap. Anyone have any ideas or things im missing here? Richard P. Cesar

This topic is closed to new replies.

Advertisement