03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

toString (LoadVars.toString method)<br />

public toString() : String<br />

Returns a string containing all enumerable variables in my_lv, in the MIME content encoding<br />

application/x-www-form-urlencoded.<br />

Returns<br />

String - A string.<br />

Example<br />

The following example instantiates a new LoadVars() object, creates two properties, <strong>and</strong> uses<br />

toString() to return a string containing both properties in URL encoded format:<br />

var my_lv:LoadVars = new LoadVars();<br />

my_lv.name = "Gary";<br />

my_lv.age = 26;<br />

trace (my_lv.toString()); //output: age=26&name=Gary<br />

Math<br />

Object<br />

|<br />

+-Math<br />

public class Math<br />

extends Object<br />

The Math class is a top-level class whose methods <strong>and</strong> properties you can use without using a<br />

constructor.<br />

Use the methods <strong>and</strong> properties of this class to access <strong>and</strong> manipulate mathematical constants<br />

<strong>and</strong> functions. All the properties <strong>and</strong> methods of the Math class are static <strong>and</strong> must be called<br />

using the syntax Math.method(parameter) or Math.constant. In ActionScript, constants<br />

are defined with the maximum precision of double-precision IEEE-754 floating-point<br />

numbers.<br />

Several Math class methods use the measure of an angle in radians as a parameter.You can use<br />

the following equation to calculate radian values before calling the method <strong>and</strong> then provide<br />

the calculated value as the parameter, or you can provide the entire right side of the equation<br />

(with the angle's measure in degrees in place of degrees) as the radian parameter.<br />

To calculate a radian value, use the following formula:<br />

radians = degrees * Math.PI/180<br />

376 ActionScript classes

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!