Saturday, June 16, 2012

[Action Script] Going next when it shouldnt - if statements June,2012

My VARIABLES

The FUNCTION:
function nextbtn2(e:Event):void {
var cName = cName_box.text
var address = address_box.text
var phone = phone_box.text

if(cName > "" && address > "" && phone > "0"){
gotoAndStop(4);
} else {
cDetailsInvalid.visible = true;
}
}

When this function is called. And i press next it displays the invalid message. But if i write anything in the phone number box and press next it will go to frame 4 no matter what is in the customer name and address box.

What am i doing wrong? THANKS for all your help guys!!
Going next when it shouldnt - if statements

Related Post



0 comments: