Groups | Blog | Home
all groups > flash actionscript > july 2004 >

flash actionscript : String equivalency as "if" condition


rjh
7/17/2004 8:57:52 PM
This has got to be simple.

I have two variables that are set as string variables.

What is the proper syntax to compare two string variables for equivalency as a
condition for an if statement:

This is what I have and it doesn't seem to be working;

if (choice == answer ){
trace ("passed if")
gotoAndStop("rightanswer");

}
else
{
trace("condition aint't working")
gotoAndStop("wronganswer")
rlc5611
7/17/2004 9:35:42 PM
Shinchi
7/18/2004 5:47:41 AM
Hi, before this block of code, try

trace(choice) and trace(answer)

Maybe there is a problem with codes before this block of code

AddThis Social Bookmark Button