EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Tostring (Boolean.tostring Method); Valueof (Boolean.valueof Method)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Boolean 343
toString (Boolean.toString method)
public toString() : String
Returns the string representation ("true" or "false") of the Boolean object.
Availability: ActionScript 1.0; Flash Player 5
Returns
String - A string; "true" or "false".
Example
This example creates a variable of type Boolean and uses
toString() to convert the value to a
string for use in the trace statement:
var myBool:Boolean = true;
trace("The value of the Boolean myBool is: " + myBool.toString());
myBool = false;
trace("The value of the Boolean myBool is: " + myBool.toString());
valueOf (Boolean.valueOf method)
public valueOf() : Boolean
Returns true if the primitive value type of the specified Boolean object is true; false
otherwise.
Availability: ActionScript 1.0; Flash Player 5
Returns
Boolean - A Boolean value.
Example
The following example shows how this method works, and also shows that the primitive value
type of a new Boolean object is
false:
var x:Boolean = new Boolean();
trace(x.valueOf()); // false
x = (6==3+3);
trace(x.valueOf()); // true

Table of Contents

Related product manuals