corta Wrote:My system is similar, just it runs without the 'if' check.
The problem is that my character can change outfits and character types during the same pose :/
So thats why I keep checking it (IF inside an OnEnterFrame). I can remove the onEnterFrame, but if Peach is stopped, for example, she wont change character/outfits when taking a new powerup (Raccoon).
So the player would need to 'walk' in order to reactivate that if in a new movie clip instance of those body parts.
We dont need to worry anyway. We can really use like 10,000 IF checkings in the whole game PER FRAME, and still have a drop like 1 FPS only.
I've seen this here! http://upshots.org/actionscript/20-tips ... tionscript
"The above would behave as expected – lets say veryHeavyFunction normally takes 10ms to execute – even in a loop of 10,000 iterations, you’ll still get back a very low number."
("lazy evaluation IFs" doesnt work in AS2, but IFs are really fast in both AS2 and AS3)
As for more tips about optimizing AS2 (and AS3): http://www.adobe.com/devnet/flash/artic ... -tips.html
corta Wrote:also, you dont have to declare frame names or do any typing when you use intergers over strings.
Actually I use it already without the label names
I only gave the example with labels to be more clear
As you see, I use fewer character types anyway (Peach, Fire Peach, Daisy, Rosalina...) but Blargh used to have 45 characters and 48 outfits.