Tostring (String.tostring Method); Touppercase (String.touppercase Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

toString (String.toString method)

public toString() : String
Returns an object's properties as strings regardless of whether the properties are strings.
Availability: ActionScript 1.0; Flash Player 5
Returns
- The string.
String
Example
The following example outputs an uppercase string that lists all of an object's properties,
regardless of whether the properties are strings:
var employee:Object = new Object();
employee.name = "bob";
employee.salary = 60000;
employee.id = 284759021;
var employeeData:String = new String();
for (prop in employee)
{
employeeData += employee[prop].toString().toUpperCase() + " ";
}
trace(employeeData);
If the
method were not included in this code, and the line in the
toString()
employee[prop].toUpperCase()
Including the
toString()

toUpperCase (String.toUpperCase method)

public toUpperCase() : String
Returns a copy of the String object, with all lowercase characters converted to uppercase. The
original value is unchanged.
Availability: ActionScript 1.0; Flash Player 5
Returns
- A string.
String
1140
ActionScript classes
, the output would be "
method produces the desired output: "
for
undefined undefined BOB
284759021 60000 BOB
loop used
".
".

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents