Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
HitTest With Irregular Shapes
Author: Siddharth
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; }
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-15
Rating: 6.89 Votes: 9
Hits: 506
» Author
College student 19 years old
Interests: Computers, Sports
» Download
Download the files used in this tutorial.
Download (0 kb)
Get conversion and unzipping tools
for PC and Mac here!
» Forums
More help? Search our boards for quick answers!
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.