[F8] enterFrame alternatives
I was creating a simple flash game as part of a project at college and it came to my attention how slow the game would run. There were a lot of symbols on the screen and part (I'm sure) the lag was caused by the massive amount of enterFrame if statements. Such as:
code:
if (anyClip_mc._y > Stage.height) {
I used a statement like this to delete symbols that fell off the lower edge of the stage. In this case it was rain that was being generated + removed. However is there a more CPU friendly way to check these sorts of conditions? Something that wouldn't require ever droplet (of which there were a lot) on every frame tick to check it's height etc.
Any ideas/help?
Thank you in advance,
JAK x