In this tutorial we will discuss about, How to create a simple button in flash. This tutorial covers about rollover effects and opens a web page when the user clicks on the button.

on (release) {
getURL('http://www.getw3help.com', '_blank');
}
Labels: ActionScript 2, Flash, Flash Basics, Flash Buttons, Tutorials
It was really nice...i made the rollover button very easily with explanatory tutorial...but when i press F9 and enter the script it says it has error<------1087: Syntax error: extra characters found after end of program.-----> and i also want to know how to save the script(like there is no button to save or anything like that)...so i request you to post screenshots of inputing scripts in flash[I am using flash cs3 Proffesional] on your website.....By the thanx for helping me create the rollover button
By doeacc, at June 22, 2008 3:20 AM
@ doeacc:
Thanks for comment.
Left click on the button and press F9. Actionscript window will open, copy and paste the code in it.
There is no need save the actionscript, its part of the flash itself. It gets saved along with flash.
and again press F9 to close the actionscript window.
I hope this helps. :)
By makubex, at June 22, 2008 9:09 AM
Hi, again!
I'm really enjoying myself here! :-)
No problems so far, as your step by step explanation is really great! I even can work together with my kids, so simple it is. TVM
rosariosirgado@hotmail.com
By R0zZ_w€l£, at June 29, 2008 9:58 AM
keep getting this error message:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) {
Total ActionScript Errors: 1 Reported Errors: 1
SL
By s, at September 14, 2008 2:33 PM
In Falsh pro 8 keep getting this error message:
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Mouse events are permitted only for button instances
on (release) {
Total ActionScript Errors: 1 Reported Errors: 1
SL
By s, at September 14, 2008 2:35 PM
when i press f9 to put in the action script it says current selection annot have actions applied to it.
By ozzi, at October 23, 2008 7:09 PM
hi ozzi,
Change the Actionscript version from 3 to 2.
Go to publish settings change Actionscript 3 to Actionscript 2.
By makubex, at October 25, 2008 3:12 AM
I get my button to work when I hit play in the timeline (with simple buttons enabled) but when I go to publish it, the button doesn't work. I have two buttons in two different scenes - one jumping from the first scene to the second and the other going to a website. Any thoughts?
By peter, at November 3, 2008 10:13 AM
Just as a follow up to the previous note, I am using CS4 on a Mac.
By peter, at November 3, 2008 10:16 AM
I get the same error as the other...yes have checked it is on actionscript 2.0
By Sims, at January 27, 2009 1:29 AM