Hey guys! I am making a big big big game, and I came across a huge problem. My game has over 60 unique units, which mean that the library of my .fla file is REALLY huge. Flash just can't handle it anymore, and crashes every 5 min. I can't optimize it(already did) and I can't cut through the content.
I think I found a solution: I will load my units from external .swf. Sooo, the thing is, I want to load these swf only once, at the start of the game. Here is how it goes:
I divided my units in many packets, and set every unit to be "exported for Actionscript" in the library.
This way, ill load the .swf and its library at the beginning of the game and I will be able to attach the units MC over runtime.
NOT!
First, I tried to load the .swf on the main stage (_root). It completely replaced the whole stage.
So I decided to upload it in an empty MovieClip. It works!
My problem is, when I try to attach a movieclip it is only working if I attach it in the loaded Movie Clip.
Exemple:
lets say I uploaded the swf in a MovieClip named _root.dynamic_unit1.
If I want to get my unit from the swf's library, i have to do the following:
_root.dynamic_unit1.attachMovie("unit1 ","new_unit",1); (which is working)
_root.attachMovie("unit1","new_unit",1 ) (THIS IS NOT WORKING);
So the big problem is that I have to get that MovieClip from the library in an other MovieClip in my game.
Example: _root.game.units.unit1.anims.HERE
Any genius could help me?
Yinyangpenguin
Uhhhhh... Well.... shit.