STEP 4 - The Actionscript
Ok. here's where it gets slightly more complicated. Click the cursor movie clip on the stage and drag it to the center. Once it is selected, press the "F9" key on your keyboard to bring up it's actions panel. Type into it the following:
This script tells the cursor movie clip to move along with your mouse.
onClipEvent (load) {
startDrag(this, true);
}
Now select the first one of your buttons and press "F9" again to bring up it's actions panel. Type in the following:
This script tells the cursor movie clip to go to frame two when ever the button is clicked.
on (press) {
_root.cursor.gotoAndPlay(2);
Mouse.hide();
}
Repeat this for all the buttons but change the frame number for each one, for example: on the second button you would put:
Notice how it says gotoAndPlay(3); instead of 2 like the first one. Repeat this for all the buttons with the third button being gotoAndPlay(4); and the fourth being gotoAndPlay(5);
on (press) {
_root.cursor.gotoAndPlay(3);
Mouse.hide();
}
| » Level Basic |
|
Added: 2004-09-09 Rating: 8 Votes: 8 |
| » Author |
| I've been a flash developer for about 2-3 years now, i never realised how complicated it would be :S I prefer making games to animations, but I'll try anything once :) |
| » Download |
| Download the files used in this tutorial. |
| Download (799 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!