|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Passing Internal Variable
Hi,
I am still fairly new to actionscripting, so this question may seem a little basic. I have a series of nav buttons within a movie clip on the main timeline. The buttons all have instance names and each has a value of n between 1 and 4, depending on which is pressed. I am trying to pass the variable to an action on a frame on the main timeline that says, if n=1 (or whatever), gotoAndPlay("bioSection"), for example. For some reason, I'm doing something wrong in the syntax I guess and it's not working. Any ideas?? thanks, Dave |
|
#2
|
|||
|
|||
|
Howdy...
![]() I am not quite sure since you didn't provide the code, but I have a feeling that you are using '=' within the if condition where '==' should be used... For example, Code:
if (n == 1)
{
// right condition
}
else
{
// wrong condition
}
|
|
#3
|
|||
|
|||
|
Yeah...a buddy of mine sorted me out. First, when I was assigning the variable, I was saying n=1 instead of n="1". Then, when it's called it's == as you said, with the 1 in quotes.
Thanks! Dave |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > Passing Internal Variable |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|