Global Methods
 FunctionDefined By
  
Query whether a particular bugfix is in effect for this object.
Top Level
  
Decodes an encoded URI into a string.
Top Level
  
Decodes an encoded URI component into a string.
Top Level
  
Encodes a string into a valid URI (Uniform Resource Identifier).
Top Level
  
Encodes a string into a valid URI component.
Top Level
  
Converts the parameter to a string and encodes it in a URL-encoded format, where most nonalphanumeric characters are replaced with % hexadecimal sequences.
Top Level
  
AVM-only getClassByName(name:String, domain:Domain = null):Class
Gets a class definition by name.
Top Level
  
Top Level
  
Returns true if the value is NaN (not a number).
Top Level
  
Determines whether the specified string is a valid name for an XML element or attribute.
Top Level
  
parseFloat(str:String = "NaN"):Number
Converts a string to a floating-point number.
Top Level
  
parseInt(s:String = "NaN", radix:int = 0):Number
Converts a string to an integer.
Top Level
  
AVM-only print(... arguments):void
Displays expressions, or writes to log files, while debugging.
Top Level
  
Top Level
  
trace(... arguments):void
Displays expressions, or writes to log files, while debugging.
Top Level
  
Evaluates the parameter str as a string, decodes the string from URL-encoded format (converting all hexadecimal sequences to ASCII characters), and returns the string.
Top Level


Global Constants
 ConstantDefined By
  Infinity : Number = Infinity
A special value representing positive Infinity.
Top Level
  NaN : Number = NaN
A special member of the Number data type that represents a value that is "not a number" (NaN).
Top Level
  undefined : * = undefined
A special value that applies to untyped variables that have not been initialized or dynamic object properties that are not initialized.
Top Level
Constant Detail
InfinityConstant
public const Infinity:Number = Infinity

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

A special value representing positive Infinity.

The value of this constant is the same as Number.POSITIVE_INFINITY.

See also


Example
The result of division by 0 is Infinity, but only when the divisor is a positive number.
     trace(0 / 0);  // NaN
     trace(7 / 0);  // Infinity
     trace(-7 / 0); // -Infinity
     
NaNConstant 
public const NaN:Number = NaN

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

A special member of the Number data type that represents a value that is "not a number" (NaN).

When a mathematical expression results in a value that cannot be expressed as a number, the result is NaN. The following list describes common expressions that result in NaN.

The NaN value is not a member of the int or uint data types.

The NaN value is not considered equal to any other value, including NaN, which makes it impossible to use the equality operator to test whether an expression is NaN. To determine whether a number is the NaN function, use isNaN().

See also

isNaN()
Number.NaN
undefinedConstant 
public const undefined:* = undefined

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

A special value that applies to untyped variables that have not been initialized or dynamic object properties that are not initialized.

In ActionScript 3.0, only variables that are untyped can hold the value undefined, which is not true in ActionScript 1.0 and ActionScript 2.0. For example, both of the following variables are undefined because they are untyped and unitialized:

The undefined value also applies to uninitialized or undefined properties of dynamic objects. For example, if an object is an instance of the Object class, the value of any dynamically added property is undefined until a value is assigned to that property.

Results vary when undefined is used with various functions:

Do not confuse undefined with null. When null and undefined are compared with the equality (==) operator, they compare as equal. However, when null and undefined are compared with the strict equality (===) operator, they compare as not equal.

See also

null

Example
In the following example, an untyped variable, myVar is declared but not initialized. The value of myVar is undefined because the variable is untyped. This is true whether the variable has no type annotation or uses the special (*) untyped annotation (var myVar:*;).
     // trace value of untyped and uninitialized variable
     var myVar;
     trace(myVar); // undefined
     
The same rule applies to uninitialized properties of a dynamic object. For example, given an instance, obj, of the dynamic class A, the value of obj.propName, which is an uninitialized property of the obj instance, is undefined.
     dynamic class A {}
     var obj:A = new A()
     
     // trace undefined property of obj
     trace(obj.propName); // undefined
     
Function detail
AVM-only bugzilla()function
public function bugzilla(n:int):Boolean

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Query whether a particular bugfix is in effect for this object.

Parameters

n:int

Returns
Boolean
decodeURI()function 
public function decodeURI(uri:String):String

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Decodes an encoded URI into a string.

Returns a string in which all characters previously encoded by the encodeURI function are restored to their unencoded representation.

The following table shows the set of escape sequences that are not decoded to characters by the decodeURI function. Use decodeURIComponent() to decode the escape sequences in this table.

Escape sequences not decodedCharacter equivalents
%23#
%24$
%26&
%2B+
%2C,
%2F/
%3A:
%3B;
%3D=
%3F?
%40@

Parameters

uri:String — A string encoded with the encodeURI function.

Returns
String — A string in which all characters previously escaped by the encodeURI function are restored to their unescaped representation.

See also

decodeURIComponent()
encodeURI()
encodeURIComponent()

Example
     package
     {
     import flash.display.Sprite;
     
         public class DecodeURIExample extends Sprite
         {
             public function DecodeURIExample()
             {
                 var uri:String = "http://www.example.com/application.jsp?user=<user name='some user'></user>";
                 var encoded:String = encodeURI(uri);
                 var decoded:String = decodeURI(encoded);
                 trace(uri);        // http://www.example.com/application.jsp?user=<user name='some user'></user>
                 trace(encoded);    // http://www.example.com/application.jsp?user=%3Cuser%20name='some%20user'%3E%3C/user%3E
                 trace(decoded);    // http://www.example.com/application.jsp?user=<user name='some user'></user>
             }
         }
     }
     
decodeURIComponent()function 
public function decodeURIComponent(uri:String):String

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Decodes an encoded URI component into a string.

TODO

Parameters

uri:String

Returns
String
encodeURI()function 
public function encodeURI(uri:String):String

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Encodes a string into a valid URI (Uniform Resource Identifier).

TODO

Parameters

uri:String

Returns
String
encodeURIComponent()function 
public function encodeURIComponent(uri:String):String

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Encodes a string into a valid URI component.

TODO

Parameters

uri:String

Returns
String
escape()function 
public function escape(s:String):String

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Converts the parameter to a string and encodes it in a URL-encoded format, where most nonalphanumeric characters are replaced with % hexadecimal sequences.

TODO

Parameters

s:String

Returns
String
AVM-only getClassByName()function 
public function getClassByName(name:String, domain:Domain = null):Class

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Gets a class definition by name.

Parameters

name:String — The name of the definition.
 
domain:Domain (default = null) — If no domain is passed, the function use the current domain.

Returns
Class — The class reference of the definition.
isFinite()function 
public function isFinite(n:Number = NaN):Boolean

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Parameters

n:Number (default = NaN)

Returns
Boolean
isNaN()function 
public function isNaN(n:Number = NaN):Boolean

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Returns true if the value is NaN (not a number).

TODO

Parameters

n:Number (default = NaN)

Returns
Boolean
isXMLName()function 
public function isXMLName(str:*):Boolean

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Determines whether the specified string is a valid name for an XML element or attribute.

TODO

Parameters

str:* (default = NaN)

Returns
Boolean
parseFloat()function 
public function parseFloat(str:String = "NaN"):Number

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Converts a string to a floating-point number.

TODO

Parameters

str:String (default = "NaN")

Returns
Number
parseInt()function 
public function parseInt(s:String = "NaN", radix:int = 0):Number

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Converts a string to an integer.

TODO

Parameters

s:String (default = "NaN")
 
radix:int (default = 0)

Returns
Number
AVM-only print()function 
public function print(... arguments):void

Language Version : ActionScript 3.0
Runtime Versions : RedTamarin 0.4

Displays expressions, or writes to log files, while debugging.

A single print statement can support multiple arguments. If any argument in a print statement includes a data type other than a String, the print function invokes the associated toString() method for that data type. For example, if the argument is a Boolean value the print function invokes Boolean.toString() and displays the return value.

Note: The print() function is completely similar to the trace() function, the only difference is that you can hook your own function to the print() function. TODO Program.onPrint = function() { ... }

Parameters

... arguments — One or more (comma separated) expressions to evaluate. For multiple expressions, a space is inserted between each expression in the output.

See also

trace()

Example
The following example show how the print() method can be used to print a simple string. Generally, the message will be printed to a "Debug" console.
     print( "Hello World" );
     
readLine()function 
public function readLine():String

Returns
String
trace()function 
public function trace(... arguments):void

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Displays expressions, or writes to log files, while debugging.

A single trace statement can support multiple arguments. If any argument in a trace statement includes a data type other than a String, the trace function invokes the associated toString() method for that data type. For example, if the argument is a Boolean value the trace function invokes Boolean.toString() and displays the return value.

Parameters

... arguments — One or more (comma separated) expressions to evaluate. For multiple expressions, a space is inserted between each expression in the output.


Example
The following example uses the class TraceExample to show how the trace() method can be used to print a simple string. Generally, the message will be printed to a "Debug" console.
     package
     {
          import flash.display.Sprite;
     
          public class TraceExample extends Sprite
          {
              public function TraceExample()
              {
                  trace( "Hello World" );
              }
          }
     }
     
unescape()function 
public function unescape(s:String):String

Language Version : ActionScript 3.0
Runtime Versions : Flash Player 9, AIR 1.0

Evaluates the parameter str as a string, decodes the string from URL-encoded format (converting all hexadecimal sequences to ASCII characters), and returns the string.

TODO

Parameters

s:String

Returns
String