Search tutorials
4. Left-click on the weapon MovieClip and open up the Actions window. Write down the following code:
onClipEvent(load)
{ yspeed=2; }
onClipEvent(enterFrame)
{ _y-=yspeed; }
onClipEvent(load)
{ yspeed=2; }
onClipEvent(enterFrame)
{ _y-=yspeed; }
Explanation
The above code sets a variable yspeed to 2 when the movie first loads. Subsequently the MovieClip._y property which indicates the Y coordinate of the movieclip is set to this._y=this._y-yspeed (also written as _y-=yspeed).» Level Intermediate |
Added: 2006-03-18 Rating: 5.67 Votes: 6 |
» Author |
Studying in College, 19 years old |
» Download |
Download the files used in this tutorial. |
Download (0 kb) |
» Forums |
More help? Search our boards for quick answers! |