View Full Version : Passing variables. . .
SAINT
02-25-2003, 07:00 AM
Ok, this is sooo stupid. Even though there are a ton of references out there, and the idea is as clear as crystal to me, I just can't get it to work.
I have 3 buttons and 1 variable. I click on a button updates the variable, the next frame reads the variable and makes a decision point to go to 1 of 3 frames based on the variable the button set.
I have been trying to get this right for the last 4 hours.
Can anyone help me? BTW, I did this back when flash 4 was the stuff. Now, well, all of that knowledge is out the window.
Thanks in advance.
S!
CyanBlue
02-25-2003, 07:14 AM
Howdy...
The problem was that you were using = within the if statemtns... It should be ==, not = when you compare condition in if statement...if (q1 == 10)
{
gotoAndPlay(10);
}
else if (q1 == 20)
{
gotoAndPlay(20);
}
else if (q1 == 30)
{
gotoAndPlay(30);
}
else
{
gotoAndPlay(40);
}
cheeky_monkey
04-01-2003, 11:34 AM
Question about using... == in IF statements.
Is this also the correct syntax for Flash 4?
(don't ask why I'm using Flash 4 for a minute).
Simple prob...
I have a contacts_menu (contact_mov) mov clip on my stage.
and upon click of my contact-menu button wish to either make it CLOSE or OPEN.
So, I've tried the following...
On (Release)
If (/contact_mov:menustatus="false")
Set Variable: "/contact_mov:menustatus" = "true"
Begin Tell Target ("/contact_mov")
Go to and Play ("contacts-menu_open")
End Tell Target
Else If (/contact_mov:menustatus="true")
Set Variable: "/contact_mov:menustatus" = "false"
Begin Tell Target ("/contact_mov")
Go to and Play ("contacts-menu_close")
End Tell Target
End If
End On
CyanBlue
04-01-2003, 11:45 AM
Howdy...
You can use 'eq' instead of '==' and 'ne' instead of '!=' in F4...
So, your if statement will be...If (/contact_mov:menustatus eq "false")It's been way too long since I haven't touched F4, so I am not the right guy you want to ask F4 questions, but that's basically it...
I really want to ask why you have F4 project, but I won't since you asked not to... :D
cheeky_monkey
04-01-2003, 12:03 PM
uhhh, just because i've been freelancing for/with a client who uses f4 and they would want the FLA when I'm done.
But also due to the nature of the project...
Started out they wanted a CD / web product that would...
display some 20 products,
each opening up a PDF
each in 11 different languages
catering for most of their audience (Opticians around the world) with old Hardware / software.
Couldn't use Director as they wanted it non branded
(ie. no macromedia pop-up at the end)
So stuck with F4, used Jestor Software to make Final EXE's.
though, I would have liked it to be available to MAC users.
Any ideas ?
Cheers for your reply also !!! much appreciated.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.