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.

The following example uses the information in the previous example <strong>and</strong> produces the same<br />

result using constructor functions:<br />

var person:Object = new Object();<br />

person.name = "Gina Vechio";<br />

person.children = new Array();<br />

person.children[0] = "Ruby";<br />

person.children[1] = "Chickie";<br />

person.children[2] = "Puppa";<br />

The previous ActionScript example can also be written in the following format:<br />

var person:Object = new Object();<br />

person.name = "Gina Vechio";<br />

person.children = new Array("Ruby", "Chickie", "Puppa");<br />

See also<br />

Object<br />

() parentheses operator<br />

(expression1 [, expression2])<br />

( expression1, expression2 )<br />

function ( parameter1,..., parameterN )<br />

Performs a grouping operation on one or more parameters, performs sequential evaluation of<br />

expressions, or surrounds one or more parameters <strong>and</strong> passes them as parameters to a function<br />

outside the parentheses.<br />

Usage 1: Controls the order in which the operators execute in the expression. Parentheses<br />

override the normal precedence order <strong>and</strong> cause the expressions within the parentheses to be<br />

evaluated first. When parentheses are nested, the contents of the innermost parentheses are<br />

evaluated before the contents of the outer ones.<br />

Usage 2: Evaluates a series of expressions, separated by commas, in sequence, <strong>and</strong> returns the<br />

result of the final expression.<br />

Usage 3: Surrounds one or more parameters <strong>and</strong> passes them as parameters to the function<br />

outside the parentheses.<br />

Oper<strong>and</strong>s<br />

expression1 : Object - Numbers, strings, variables, or text.<br />

expression2 : Object - Numbers, strings, variables, or text.<br />

function : Function - The function to be performed on the contents of the parentheses.<br />

parameter1...parameterN : Object - A series of parameters to execute before the results<br />

are passed as parameters to the function outside the parentheses.<br />

Operators 157

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

Saved successfully!

Ooh no, something went wrong!