View Full Version : Call multiple AS 3.0 document in a single fla
ash_at_risk
December 19th, 2009, 08:45 AM
hi guys,
I am in trouble again.
Is there any way to use multiple document class inside same fla file,
or change document class name dynamically
i have 4-5 actionscript 3.0 file,these 4-5 files have codes of a game say level 1, level 2 ,level 3 , level 4 & 5 entirely different from each other.What i need is that when one level finishes, another level document class should be called?
Any ideas or help..
Scythe
December 19th, 2009, 08:07 PM
Few games that I have encountered had levels that seemed as though they would need different code and therefore different classes. But even if your game does need them, I'm not sure why you would want multiple "document" classes. A few possibilities:
1. Use regular classes. Each level could have its own class, which you could instantiate them or activate them or whatever when the time came to play them.
2. Use multiple SWF files. Make a different fla for each document class and compile them, then in you main swf or whatever you can load the other swfs.
Note: there's no difference between a "document" class and a "regular" class. A document class is just a class that has been assigned to a swf.
ash_at_risk
December 19th, 2009, 09:18 PM
More precisely my circumstance is that i have 4 fla & their corresponding classes
ready , but to make a game complete,i need to combine all those 4 fla & their corresponding classes into one main flash file.
i prefer 2 possibility more, i wish to know more about, how to achieve it?
Scythe
December 19th, 2009, 10:08 PM
http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.