Search tutorials
Advanced Example
Here is a more advanced example of the Hit Test method create by Flashkit's Flashguru. However the code and the principles behind the movie are the same. Below the code is the movie in action. Adjust the bar to adjust the gravity then press the space bar to get the ball to jump. If it collides with the rectangles they will move up the screen. (The source code is available in the download.)
if (this.hitTest( _root.ball)) {
setProperty (this, _y, this._y - 2);
_root.hits++;
gotoAndPlay (2);
}
| » Level Intermediate |
|
Added: 2000-10-19 Rating: 6 Votes: 74 |
| » Author |
| A flash lover, programmer and one happy guy! |
| » Download |
| Download the files used in this tutorial. |
| Download (19 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!