Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / Other - Flash AS2 - Why doesn't this reset?

Author
Message
Zeus
19
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Atop Mount Olympus
Posted: 5th Feb 2010 18:19
I am following a tutorial to teach me how to make a brick break clone and for some reason when all of the bricks are broke the ball will not reset like it is suppose to. Here is my code,

Frame 1 (Frame)


Frame 2 (Frame)


Everything as far the instances go exist, trust me. But the code I used said it was suppose to reset after I knocked every brick down but it doesn't. =/ Any suggestions?

Thanks!
-Zeus

mike5424
17
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 7th Feb 2010 10:18
What specific part of the code is it that doesn't work?

---
Hobgoblin Lord
20
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 20th May 2010 00:33
Might just be me but I do not see anything that sets or reduces brickAmt. You would be better served to push all the brick instances into an array and remove them as the bricks are destroyed checking with array_name.length.

ps. All those hitTest checks will cause the game to use up far more resources than it needs to.

Login to post a reply

Server time is: 2026-06-11 14:47:29
Your offset time is: 2026-06-11 14:47:29