I am making a flash game which is similar to the classic game Asteroids. I am stuck in the final step of the game where I have to make the collision detection working before the whole game is functioning..
My problem is I cannot figure it out how can I make the collision detection working in my game..because those asteroids are coded to appears on the stage every five seconds from the library, so I cannot give the asteroids an instance name and create the collision detection in the "normal" way, because it is not on the stage.
To simplify what I want to do is, when the spaceship hit the asteroid, the game will over (jump to the "end" scene)
Beside of that, I want to make a score indicator in my game, i want it to based on the among of time user survive, that's mean, when they surived for 3 seconds, then they will get 3 point, so how can I get the value from the timer or "timerTextField" textbox.
To simplify what I want, there is a time counter in my game, and I want to use the time counter as my score counter, that's mean, player will get 1 point every second. Until they hit by asteroid, game is over. So the longer time they survive, the higher score they can get.
Here is the attached fla file, if someone want to look at the code...
thanks a lot!
http://files-upload.com/253655/asteroid.zip.html