Making A Cross Heir
Well I know that theres a lot of people that want to make a first person shooter using flash, and thats probably a good way to start, I think that first person shooters are probably the simplest in game genres. One of the problems that new people encounter is the making of a cross heir, this tutorial is intended to help you understand how to make one.
First thing youll need is to create a new movie clip. This will serve as our cross heir. Make it something simple at first, just so you get the hang of it.
Note: The cross on flash will decide where the point of the mouse is. So if you want the exact middle of your cross heir to be the shooting part you have to make sure its in the middle of that cross.
After youre done go back to the main stage (the actual scene) and create a new layer. You probably want this layer to be at the top of everything. This is because otherwise the cross heir will go underneath your targets. Name the layer cross heir, then open up your library (Ctrl+L) and drag it over. Click on the cross heir and open up the properties of it. Where it says Instance name change it to something you can easily remember like cross. We do this so that we can refer to it in the code.
Now create a new layer and call it Actions. In the first frame of Actions open
up the actions and choose expert mode. Type in:
What we did is tell the computer to hide the mouse. Now we want the cross heir to follow the mouse, to do this type in:
What that did is start a drag on the cross heir.If you test the movie everything should be working
Final Note: change the frames per seconds to 20, this will make the cross heir follow the mouse smoothly.
|» Level Basic|
Rating: 7 Votes: 31
|14 year old guy|
|Download the files used in this tutorial.|
|Download (0 kb)|
|More help? Search our boards for quick answers!|