just downcast your variable using 'Boolean()' to a new variable which
IS a boolean...
var my_boolean_string:String = "true";
var my_boolean:Boolean = Boolean(my_boolean_string);
if(my_boolean == true) {
trace("cool");
} else {
trace("nope");
}
hth,
Cedric
hi.
i'm receiving FlashVars in my object and embed code and the values are
either "true" or "false". i assume they're brought into flash as
strings and i need them as booleans.
it is my understanding that boolean() won't do what i want because all
it does is evaluate the expression inside the parantheses instead of
converting the value to a boolean. i also read a very brief comment on
livedocs that the appropriate way to do it is cast to a number first
and then a boolean. but that doesn't make sense to me.
anyone have any experience with this?
thanks. -- matt.
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders