Shooting Objects in Flash Games

Step 1.
For this tutorial, you’ll need to download the image of a rock below, and then import (File > Import > Import to Stage) it into Flash.

Step 2.
We only need the rock temporarily on stage, so it doesn’t matter which layer you import it on. Convert the rock into an MC (movieclip symbol) called ‘asteroid’. Later on we’ll be using actionscript to attach this MC from the library onto the stage. To make this possible, the MC needs to be given an ‘identifier’, to make Flash know that we want to do this and to also make it unique. You can give the MC an identifier by checking ‘Export for Actionscript’. The identifier should automatically be named the same as the MC.

Step 3.
Go into the asteroid MC and then convert the rock image into another MC called ‘rockMC’. You don’t need to give it an identifer.

Step 4.
Now that the rock is contained in an MC, we can create some instances of it to form an asteroid. So first of all create a new layer called ‘rock 2’ and drag another copy of rockMc from the libray onto this layer. To make the asteroid appear more random, rotate the 2nd rockMc counter clockwise (modify > transform > rotate 90 CCW), as shown in image b)

Step 5.
Add another copy onto the layer ‘rock 3’, but this time rotate it clockwise (modify > transform > rotate 90 CW)

Step 6.
Add an 4th and final rockMc onto layer ‘rock 4’, this time rotating it counter clockwise again.