

![]() |
![]() |
|
|
#1 (permalink) |
|
Premium Brawler Account
Senior Member
![]() ![]() ![]() ![]() Enlightened |
Macromedia Flash 2004: ActionScript Tutorial 1
Since Noober didn't specify whicih kind of tutorials he wants, I've decided to write a helpful actionscript one.
Introduction: (you may skip) ActionScript is Flash's programming language. It is used to create all the fancy buttons and games you see in Flash. Actionscript is an OOP (object-orientieted programming) language, and is fairly simple. Lets start. Tutorial 1: Start an animation on the click of a button Section 1: Make a button in Flash. I'll name mine go. ![]() Open up the actions panel. Make sure your button is selected. Put in the following code: Code:
on (release) {
play();
}
on (release) { When the mouse button is released when over the button, do whats in between the { and the }. play(); Start playing through the timeline from the current frame. } End up the statement. There is only one more thing we need to do to make this work. On default, as soon as Flash player is loaded the movie starts playing. To stop this, open up the actions panel again, and select the first frame. Put in this code: Code:
stop(); Section 2: Lets modify our code to do the same thing in a different way. In your second frame, you will no longer need the stop(); command. Code:
on (release) {
gotoAndStop(2);
}
This tells Flash Player to go to the frame 2 and stop. gotoAndPlay(2) would tell it to go to frame 2, but then continue playing through the rest of the movie. I hope this tutorial was helpful, and any feedback is appreciated. If requested I will add more sections to this tutorial, and requests for other actionscript tutorials are welcome too. ![]() I also realize this isn't the best spot for a programming tutorial, but A. This is FLASH! and B. I felt it belonged here. Edit: Fix #2.
__________________
|
|
|
|
![]() |
![]() |
|
Advertisement
|
Sponsored links
|
![]() |
![]() |
|
|
#2 (permalink) |
|
Wtf is an acolyte?
![]() Evangelist |
"Nice tutorial."
...but those scripts are kind of self explanatory, and I know them already, so... :( What I need is like an intermediate animation tutorial (I can do sine tweening and frame by frame) or a beginner's game making tutorial. |
|
|
|
![]() |
![]() |
| Sponsored links | |
|
Advertisement
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Flash MX 2004 Professional : Beginners Flash Tutorial (released). | Ganondorf | Graphics Tutorials | 4 | 07-22-2005 10:47 PM |
| Website Links : Ultimate Beginners Flash Tutorial. | Ganondorf | Graphics Tutorials | 5 | 07-14-2005 12:43 AM |
| Flash MX 2004 Professional : Anchor Rotation. | Ganondorf | Graphics Tutorials | 4 | 07-10-2005 07:37 PM |
| GameThreat | Enigma | General Chat | 71 | 09-04-2004 07:18 PM |
| All times are GMT. The time now is 01:54 AM. |

