Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Action Scripts
Your Ad Here

Action Scripts


Ok when i first started using flash I was horrible.. but lots of work with the program gave me a good base and I started learning really quickly.. One of my main problems I had was Actionscript.. Actionscript can be used in flash to create everything from rollover buttons to advanced effects to connecting two people through their web cams..

In this little tut I will be going over some of the most basic Actionscripts and maybe a little bit more complex stuff too..

Ok first thing the stop command

stop();

this stops the movie from playing exactly where the stop command is located..

The play command

play();

This makes the movie play.

Now for some button commands...

After creating a button symbol click on it on the stage and open the actions panel..

The following are the button commands..

on (press) { }
on (release) { }
on (releaseOutside) { }
on (rollOver) { }
on (rollOut) { }
on (dragOver) { }
on (dragOut) { }
on (keyPress "<what key you want>") { }

When applied with what we learned earlier with the stop and play commands you could do something like this..

on (keyPress"<space>") { stop(); } on (rollOver) { play(); }

Another usefull command is the goto commands

gotoAndPlay(); gotoAndStop();

Inside the () is where you would put where you want the command to be exicuted..

ex.. gotoAndPlay(2)

The number 2 would be frame two

You can also use frame lables..

If you click on a Keyframe on the top timeline then look in the properties inspecter there is a little input txt box.. Inside this box you can name the frame or "label" it..

for ex.

image 1

image 2

Use these with the button commands to create something like this

on (release) { gotoAndPlay(34); } on (press) { gotoAndStop("end"); }

Ok well thats it for now



Author's URL: dudebud
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Action Scripts"

Only registered users can write comment

No comments yet...