Hi,

I have a mini-game where I have three movieclips:

The player (controlled by mouse);
A random object that moves around the stage (like the arkanoid ball without the paddle and the blocks);
A simple power up.

The game is simple: hitting the power up increases your score. The game ends when the object hits the player.

The question is:

How can I spawn the power-up (randomly) on the stage area, every time the player hits it?

When that happens I want the following events to occur:

1) The power-up to be removed;
2) Increase the score by 1.
3) Place a new power up randomly on the stage.
4) Rinse and repeat.

Unfortunately, I don't know how to build a function that does that.
Which is the better way? Using a for loop to place the power ups?

Thanks.