Hey guys…
I just started to learn AS3 and i have this problem:
I tried to create a input text that asks the user to enter a value then i wanted that value to be compared with another var by an if statement but when it gets to that part it always goes to the else condition. I did check the values by making the flash view, they are the same but its still not running as i want it to.
anyways ill leave you with the code :):
variables:
btn: a button i created
maq: an empty string that stores the value of the input text
GPA.text: name of the input text
V3: is just a dynamic text to let me know if the condition is met or not
stop();
btn.addEventListener(MouseEvent.MOUSE_UP,checker);
function checker(Event:MouseEvent):void
{
var maq:String ="";
var GP1:String ="3";
maq=GPA.text;
if(maq==GP1)
{
V3.text=maq;
//gotoAndStop(2);
}
else
{
V3.text="thats not it";
//gotoAndStop(3);
}
}