Page 3 of 3

Re: AS3 Question(s)

PostPosted: June 5th, 2013, 3:24 pm
by Blablob
I was already well aware of the issue with the bullets, and I knew it was going to eventually cause problems later.
(I just wasn't sure how to fix it. So thanks!)

Runouw wrote:Why are you using a new enterFrame for every single bullet that gets spawned? If you already have an array that contains all the bullets you can use just ONE enterFrame and iterate through your array once per frame to move (and even remove) the bullets. I avoid using too many listeners in flash because it ruins control and it gets confusing to pass variables around using them. Also there is a tiny performance overhead to having many events, but that isn't important.

I get what you're saying, but I'm not exactly sure how to set that up.

Edit: Got it. Thanks!