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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

var user2:Users = new Users();<br />

trace(Users.instances);<br />

See also<br />

private statement<br />

super statement<br />

super.method([arg1, ..., argN])<br />

super([arg1, ..., argN])<br />

the first syntax style may be used within the body of an object method to invoke the<br />

superclass version of a method, <strong>and</strong> can optionally pass parameters (arg1 ... argN) to the<br />

superclass method. This is useful for creating subclass methods that add additional behavior<br />

to superclass methods, but also invoke the superclass methods to perform their original<br />

behavior.<br />

The second syntax style may be used within the body of a constructor function to invoke the<br />

superclass version of the constructor function <strong>and</strong> may optionally pass it parameters. This is<br />

useful for creating a subclass that performs additional initialization, but also invokes the<br />

superclass constructor to perform superclass initialization.<br />

Returns<br />

Both forms invoke a function. The function may return any value.<br />

Parameters<br />

method:Function - The method to invoke in the superclass.<br />

argN - Optional parameters that are passed to the superclass version of the method (syntax 1)<br />

or to the constructor function of the superclass (syntax 2).<br />

switch statement<br />

switch (expression){caseClause: [defaultClause:] }<br />

Creates a branching structure for ActionScript statements. As with the if statement, the<br />

switch statement tests a condition <strong>and</strong> executes statements if the condition returns a value<br />

oftrue. All switch statements should include a default case. The default case should include a<br />

break statement that prevents a fall-through error if another case is added later. When a case<br />

falls through, it doesn't have a break statement.<br />

Parameters<br />

expression - Any expression.<br />

Statements 199

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

Saved successfully!

Ooh no, something went wrong!