Tostring (Boolean.tostring Method); Valueof (Boolean.valueof Method) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Example
The following code creates a new empty Boolean object called
var myBoolean:Boolean = new Boolean();

toString (Boolean.toString method)

public toString() : String
Returns the string representation (
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
- A string;
String
"true"
Example
This example creates a variable of type Boolean and uses
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
if the primitive value type of the specified Boolean object is true;
true
otherwise.
Availability: ActionScript 1.0; Flash Lite 2.0
Returns
- A Boolean value.
Boolean
Example
The following example shows how this method works, and also shows that the primitive value
type of a new Boolean object is
var x:Boolean = new Boolean();
trace(x.valueOf());
x = (6==3+3);
trace(x.valueOf());
270
ActionScript classes
or
"true"
"false"
or
.
"false"
:
false
// false
// true
:
myBoolean
) of the Boolean object.
to convert the value to a
toString()
false

Advertisement

Table of Contents
loading

Table of Contents