If the variable is actually present, it will have a value: an emtpy string.
And you may have to check for "0" instead of 0, again a string.
if (urlvars.bids != "" && urlvars.bids != "0")
regards,
Muzak
----- Original Message -----
From: "Alexander Farber" <[email protected]>
To: "Flash Coders List" <[email protected]>
Sent: Thursday, April 09, 2009 3:13 PM
Subject: [Flashcoders] AS3: if (urlvars.bids != null) trace(urlvars.bids);still
prints null?
Hello,
does anybody please have an idea, why would this code:
private function handleComplete(event:Event):void {
var urlvars:URLVariables = event.target.data;
......
if (urlvars.bids != null && urlvars.bids != 0) {
trace(urlvars.bids);
.....
}
}
still print out "null"? Is it maybe because null != null in AS3
and I have to perform some other check similar to isNaN()?
Thank you
Alex
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders