When casting string values to primitive objects you are accustomed to this syntax:
var tb:int = int("1234");
This returns an integer type with a value of 1,234. However, in Action Scrip 3 Boolean type casting is a little quirky. Using the same syntax will not deliver the result you are expecting.
var tb:Boolean = Boolean("false"); //** returns a boolean type object
//** with a value of true
This is because the Boolean cast function takes any non-null string as a true value. To “work around” this limitation in the language you can you this simple assignment when casting a string value to a Boolean type object.
var ts:String = "false";
var tb:Boolean = ( ts == 'true') ? true : false; //** Returns a boolean type object
//** with a value of false.