Groups | Blog | Home
all groups > flash actionscript > february 2006 >

flash actionscript : Help with buttons...


MixedUpMusicInc
2/16/2006 7:49:02 PM
so I made a button in Fireworks and set a URL that the button is supposed to
link to when it is clicked. I then imported it into Flash and put it in the
libray. And then I dropped it onto the spot that I wanted it to be. Saved it to
my site and now nothing happens when you click the button.

what do I do?

www.mixedupdancemusic.com (there is only one page. you can't miss it)
MixedUpMusicInc
2/16/2006 8:06:09 PM
ok so here is the error message after I added actionscript to tell the button
to link to a form

**Error** Symbol=LabelSubmitForm, layer=Layer 1, frame=1:Line 1: ')' or ','
expected

getURL(https://fs8.formsite.com/uMixedUpMusic/form997636043/secure_index.html);

Total ActionScript Errors: 1 Reported Errors: 1
MixedUpMusicInc
2/16/2006 8:10:22 PM
when I tried that I got...

**Error** Symbol=LabelSubmitForm, layer=Layer 1, frame=1:Line 1: Statement
must appear within on/onClipEvent handler

getURL("https://fs8.formsite.com/uMixedUpMusic/form997636043/secure_index.html")
;

Total ActionScript Errors: 1 Reported Errors: 1



WHAT DOES THAT MEAN?
kglad
2/16/2006 8:18:54 PM
well, if you want a button to execute that action you must use code to let
flash know what action should trigger its execution. for example, if you want
that to execute on button press use:

on(press){

getURL("https://fs8.formsite.com/uMixedUpMusic/form997636043/secure_index.html")
;
}
MixedUpMusicInc
2/16/2006 8:32:31 PM
Im so conused. I just copied and pasted what you put there and this is the
error message I get.

**Error** Scene=Scene 1, layer=Level 220, frame=19:Line 2: on handlers may not
nest within other on handlers
on (press) {

Total ActionScript Errors: 1 Reported Errors: 1

kglad
2/16/2006 9:18:18 PM
that looks like you already have some on(press) code attached to that button.
if you already have:

on(press){
.
.
.} //<- note: you need this last bracket,

then just add:

on(press){
.
.

getURL("https://fs8.formsite.com/uMixedUpMusic/form997636043/secure_index.html")
;

}
AddThis Social Bookmark Button