PDA

View Full Version : Game slowdown with too many clip instances....



biznuge
October 20th, 2004, 06:30 AM
I have a problem with slowdown of a small game i have been developing. I think the problem may be that the depth of each new instance is allowing for each new clip to continue with its script after it has been killed, meaning quite rapidly, flash is having to deal with up to 15-20 autonomous objects at once.

Please could someone tell me how to kill these clips, or how to speed up flash, by cutting quality or whatever.

Please see attached .FLA and .AS to view the script.

Dr Warm
October 20th, 2004, 09:13 AM
i viewed the game but it's heaps messy (no offense) and at the start i died (i think) my ship split into 3 green pieces? <-- gather this isn't supposed to happen.

Can u tell me what i'm supposed to see?

Also please convert to mx if u can (not only for my sake though), i only have 2 days left of trial 2004!!

Dr Warm
October 20th, 2004, 09:15 AM
ps have u looked at removeMovieClip(); if the answer is know i suggest u go to the flash help there

biznuge
October 20th, 2004, 11:44 AM
dr warm. thanks for the reply

to see the actual game, you will have to hit "ctrl + ENTER" a couple of times when the movie loads. problemn with variable initialisation i think!!!

I've looked into remove_mc but since each different spawn gets a different level, and you can't unload an mc from its own level, how do i find the depth of each one to remove it.

I know what you meen about MESSY, but that's just my style. You should see my office!!!

another question though. how do you load an already made swf into a new mc on a new flash doc. I'm trying it at the moment, but the AS part of the movie doesn't seem to like being inside anither MC. It works fine in the _root of a movie though...

thanks for your time.

Dr Warm
October 21st, 2004, 05:59 AM
I know what you meen about MESSY, but that's just my style. You should see my office!!! if office is as messy as this fla, u wouldn't be able to get in the door, i can't make anything out of it, but as long as u can i guess thats ok (just hope u don't have to work on any group projects). I couldn't find where u have the animations for the asteroids exploding, but at the last keyframe of animation (after exploding) just put in this.removeMovieClip(); that should remove it no matter how u called it.

BTW i attached a asteroids game that i got awhile ago, probably not the best one but i thought u should look at it

biznuge
December 8th, 2004, 09:43 AM
there is no animation. I was trying to create a design that incorporated only one single frame on the timeline for the game, using actionscript to do absolutely everything. If you click into the asteroid mc you can see the script for explosion.