PDA

View Full Version : simple button glitch??


TheBarron
01-14-2003, 01:58 PM
i have the following code:

on (rollOver) {
_root.targeter.drag.gotoAndPlay(125);
}

i want to add another line of code so it will be...

on (rollOver) {
_root.targeter.drag.gotoAndPlay(125);
_root.nav1.31specCopy.gotoAndPlay(1);
}

simple straightforward right out of the manual but for some reason when i put that extra line of code anywhere i get this error when i test it:

Symbol=nav1, Layer=buttons, Frame=1: Line 3: ';' expected
_root.nav1.31specCopy.gotoAndPlay(1);

i am running into this problem in 2 different flash movies.. what gives? also the Fla movie i am working in now... it seems where ever i add that new line of code i get the same error. i tried putting it in a function on the main timeline to no avail.. help is welcome!!

emergency_pants
01-14-2003, 02:33 PM
have you tried renaming your "31specCopy" movieclip so that the name doesn't start with a number?

jcgodart
01-14-2003, 02:34 PM
Hi,

You get this error coz the path contains an instance name that starts with a digit.

Instances names should begin with a letter or underscore followed by letter(s) or underscore(s) or digit(s), nothing else. Indeed you can access instances with other names using the array syntax, but renaming them will make it much easier.

_root.nav1.spec31Copy.gotoAndPlay(1);

Hope this helps,
Jean-Christophe

TheBarron
01-14-2003, 02:46 PM
Thanks!! that tidbit i think got pushed out of my brain as i have been learning all of this actionscripting