() Parentheses Operator - 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

The following example creates an object
,
,
address
city
state
var account:Object = {name:"Macromedia, Inc.", address:"600 Townsend
Street", city:"San Francisco", state:"California", zip:"94103",
balance:"1000"};
for (i in account) {
trace("account." + i + " = " + account[i]);
}
The following example shows how array and object initializers can be nested within each
other:
var person:Object = {name:"Gina Vechio", children:["Ruby", "Chickie",
"Puppa"]};
The following example uses the information in the previous example and produces the same
result using constructor functions:
var person:Object = new Object();
person.name = "Gina Vechio";
person.children = new Array();
person.children[0] = "Ruby";
person.children[1] = "Chickie";
person.children[2] = "Puppa";
The previous ActionScript example can also be written in the following format:
var person:Object = new Object();
person.name = "Gina Vechio";
person.children = new Array("Ruby", "Chickie", "Puppa");
See also
Object

() parentheses operator

(expression1 [, expression2])
( expression1, expression2 )
function ( parameter1,..., parameterN )
Performs a grouping operation on one or more parameters, performs sequential evaluation of
expressions, or surrounds one or more parameters and passes them as parameters to a function
outside the parentheses.
account
,
, and
with accompanying values:
zip
balance
and initializes the properties
,
name
Operators
169

Advertisement

Table of Contents
loading

Table of Contents