Search tutorials
Terrain Scrolling Code
Here are the extra variables on the main timeline that are needed for the terrain scrolling...
Comment: ---------------------------------------------- Comment: terrain variables Comment: ---------------------------------------------- Set Variable: "scrheight" = 450 Comment: tmov=terrain scroll speed Set Variable: "tmov" = 3 Set Variable: "twidth" = 9 Set Variable: "theight" = 9
These are some simple variables to set up how wide our terrain is. The terrain data variables below are 9 objects wide.
Comment: NOTE: because all items are "LIVE" (they want to run down your screen) I have to tell the original items (the ones you see on the pasteboard) to "stop". When duplicated, movie clips automatically (a) become visible even if their original wasn't and (b) play.
Set Variable: "n" = 32
Loop While (n<%lt%>=128)
Begin Tell Target (Chr(n))
Comment: cheat: because all my movie clips have a single character as their name and are between 32 and 128 on the ASCII chart I can simply tell ALL those clips to STOP (whether they exist or not).
Stop
End Tell Target
Set Variable: "n" = n+1
End Loop
| » Level Advanced |
|
Added: 2000-06-06 Rating: 7 Votes: 72 |
| » Author |
| Flashjunkie is a self-professed obsessive addict of life. Due to the highly artistic nature required of an Art Director for an Ad agency, he took up Flash to add some math to his diet. |
| » Download |
| Download the files used in this tutorial. |
| Download (78 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!