AS3 Question(s)

Need programming help? Want to post programming tips? Are you programming a game and want to show it off? That and more here.

Re: AS3 Question(s)

Postby Blablob » June 5th, 2013, 3:24 pm

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!
User avatar
Blablob
Content for Contempt

 
Posts: 3108
Joined: September 6th, 2009, 3:38 pm
Location: That way

Credit To Team

Thumbs Up given: 67 times
Thumbs Up received: 229 times

Previous

Return to Programming