|
|
Search Tutorials
Tying it all togetherAdding the script to the bullet hole.Click the bullet hole, press F9, and put these actions into the box.
onClipEvent(mouseDown) {
i++;
duplicateMovieClip(this, "bulletnew" + i, i);
_root.aimer.gotoAndPlay(2);
}
onClipEvent (load) {
this._x = _root._xmouse;
this._y = _root._ymouse;
}
What the hell is that?Pretty much all that says is : Every time the mouse is clicked, the variable (i) increases by 1, thus duplicating movie clip by an additional 1. The GotoAndPlay(2) tells the crosshair to play it's shot animation. <%brk%>Done!Any problems?Consult the .FLA. There is some stop actions and things that are optional but work for optimum performance. FINISHED PRODUCT: |
|||||||||||
![]() |
||||||||||||
|