| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Sep 2008
Posts: 22
|
I have written a suite of 5 games which run in projector mode. I would like to know if this is good practice:
I divided the project up into separate swfs - one for the main menu, and one for each game. I use a single loader object to load the different swfs. Each time I load a swf it replaces the previous one. I built it this way because a single swf took too long to compile. Also, I thought I would be able to migrate to AS3 one module at a time. Is this good practice? Is it feasible? Last edited by Jas_The_Ace; 09-08-2008 at 01:37 AM.. Reason: didn't get any answers |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Aug 2008
Posts: 39
|
I'm wondering this as well.
|
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Sep 2008
Posts: 22
|
Are you using Loader class in AS3?
What problems have you encountered / do you foresee? |
|
|
|
|
|
#4 |
|
as[org].addListener(this)
Join Date: Dec 2005
Location: LA, California
Posts: 838
|
Yeah, it definitely is.
You don't need to load all the games into the same projector, especially if the games use a lot of resources. Plus you don't want to have to recompile the projector every time you change the games, do you? |
|
|
|
|
|
#5 |
|
Registered User
Join Date: Sep 2008
Posts: 22
|
Thanks Assert that's very reassuring
My game uses one projector exe that has one Loader. The loader only holds one swf at a time, so if you change game it just replaces the old one. Interesting idea to turn all the games into projectors but thats a lot of Meg. My probelm is that some of the games are in AS2 and they do some strange things when you load them from AS3. Has anyone elase had experience of this? Last edited by Jas_The_Ace; 09-11-2008 at 11:38 AM.. |
|
|
|
|
|
#6 | |
|
as[org].addListener(this)
Join Date: Dec 2005
Location: LA, California
Posts: 838
|
Quote:
2) You can prevent filesize overhead by compiling common classes/assets into the main projector. For class files, Flex Builder 3 has a means of doing this for you...otherwise you'd probably have to write some compiler directives to handle that sort of thing. |
|
|
|
|
|
|
#7 |
|
Obfuscated Coder
Join Date: Apr 2008
Posts: 686
|
One of the biggest things you'll have to watch out for when migrating to AS3 is that each module will have to be absolutely meticulous about cleaning up after itself when it's unloaded. Leave no listener un-removed, and leave no timeline, interval, Timer object, or SoundChannel playing. Read up on some of the articles written on the topic by Colin Moock and Grant Skinner for just exactly what to watch out for.
__________________
man.mask = mask_mc; Sigh. The AS3 version just doesn't look at nice as 'man.setMask(mask_mc);' |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Sep 2008
Posts: 22
|
Thanks Masked Man. This looks very important.
Could you please post a link to Colin Moock's. I read Grant Skinner's 3 Acticles, but I'm still waiting for the 4th one. Can anybody please tell me how the garbage collector works when AS3 loads an AS2 movie and then unloads it? |
|
|
|
|
|
#9 |
|
Obfuscated Coder
Join Date: Apr 2008
Posts: 686
|
Here is the link to Colin Moock's article. It's by no means as exhaustive as Grant Skinner's writings, but it provides a handy checklist.
http://www.moock.org/blog/archives/000279.html EDIT: Also, this is another Skinner article on the topic, written after the original 3 http://www.gskinner.com/blog/archive...e_to_unlo.html
__________________
man.mask = mask_mc; Sigh. The AS3 version just doesn't look at nice as 'man.setMask(mask_mc);' Last edited by maskedMan; 09-26-2008 at 04:33 PM.. |
|
|
|
|
|
#10 |
|
Registered User
Join Date: Aug 2008
Posts: 4
|
I am doing a similar thing. I created a projector and it loads one swf at a time, depending on what button the user presses. The problem that I am having is that I cannot pass parameters to the loaded swf. When my main program was a swf file, I could pass parameters when I loaded. Anyone know how to pass parameters when a projector loads a swf?
Here is the request I am making: requeststring = "MyProgram.swf?gh=1&htmlh=10&stgt=" + gtargument[j]; |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing variables between swf's | hothousegraphix | ActionScript 2.0 | 10 | 06-26-2006 10:18 PM |
| suggestions for splitting up a large task? | jsebrech | ActionScript 2.0 | 9 | 04-11-2005 07:35 PM |
| Freelancer project | electronic ink | Projects and Positions | 0 | 06-30-2003 12:41 PM |
| Need help/advice on large multimedia project architechure | jdriscol | ActionScript 1.0 (and below) | 3 | 11-06-2002 06:07 PM |
| New Project | Lucremonkey | Projects and Positions | 5 | 04-04-2002 04:18 PM |