Search tutorials
The Code
onClipEvent (enterFrame) { // When the right key is down, it starts scrolling left. if(Key.isDown(Key.RIGHT)) { this._x=_x-25; } } onClipEvent (enterFrame) { // When the left key is down, it starts scrolling right. if(Key.isDown(Key.LEFT)) { this._x=_x+25; } }Playing With The Code
Change Scroll Speed: Change the 25. Change scroll button: Change LEFT to RIGHT OR Change RIGHT to LEFTExplaining Code
That is just a movement code reversed. It is very easy.Try to explain code even farther
MMMkaay. This snippet: this._x=_x-25; means x wil go backward (-). The minus means go backward. This snippet: this._x=_x+25; means x will go foreward (+). The plus means go foreward.| » Level Basic |
|
Added: 2006-04-23 Rating: 1.94 Votes: 16 |
| » Author |
| I have taken some great haymakers since over 7 of my games have been slaughtered. One took me 3 months to make. |
| » Download |
| Download the files used in this tutorial. |
| Download (0 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!