PDA

View Full Version : Help with a simple game


bardur
03-02-2008, 04:09 PM
Hi.
Im making a game, where your goal is to catch falling toys.
If you catch them you get a point, and if you dont catch them, they get destroyd.

Here's the file: GAME FILE (http://www.jfstudios.com/andreas/game_test.fla)

But i got two issues.:confused:

1. When they hit the ground, i want to play a movieclip of the toy getting destroyd. But im not shure how to do this.

2. I want the toys to fall down behind the character, but now they fall down in front AND behind.

Thanks.:)

rrh
03-03-2008, 04:25 PM
1. The ground is flat, so you can just test the _y value. In your spinning movie clip, you could put the animation of it breaking at the end of the loop, and have a frame just before it that goes gotoAndPlay(1) and then when the object exceeds the ground's _y value, it gotoAndPlay(endOfLoop) and in the last frame of the breaking animation, it has the code to take it back to the top of the screen.

2. The layering of movie clips depends upon their depth.
maybe something like
player_mc.swapDepths(ant_leker+101) will put the player ahead of them all.