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.

Method summary<br />

Methods inherited from class Object<br />

addProperty (Object.addProperty method), hasOwnProperty<br />

(Object.hasOwnProperty method), isPropertyEnumerable<br />

(Object.isPropertyEnumerable method), isPrototypeOf (Object.isPrototypeOf<br />

method), registerClass (Object.registerClass method), toString<br />

(Object.toString method), unwatch (Object.unwatch method), valueOf<br />

(Object.valueOf method), watch (Object.watch method)<br />

onStatus (System.onStatus h<strong>and</strong>ler)<br />

onStatus = function(infoObject:Object) {}<br />

Event h<strong>and</strong>ler: provides a super event h<strong>and</strong>ler for certain objects.<br />

The SharedObject class provides an onStatus() event h<strong>and</strong>ler that uses an information<br />

object for providing information, status, or error messages. To respond to this event h<strong>and</strong>ler,<br />

you must create a function to process the information object, <strong>and</strong> you must know the format<br />

<strong>and</strong> contents of the returned information object.<br />

In addition to the SharedObject.onStatus() method, Flash also provides a super function<br />

called System.onStatus(), which serves as a secondary error message h<strong>and</strong>ler. If an instance<br />

of the SharedObject class passes an information object with a level property of "error", but<br />

you did not define an onStatus() function for that particular instance, then Flash uses the<br />

function you define for System.onStatus() instead.<br />

Parameters<br />

infoObject:Object - A parameter defined according to the status message.<br />

Example<br />

The following example shows how to create a System.onStatus() function to process<br />

information objects when a class-specific onStatus() function does not exist:<br />

// Create generic function<br />

System.onStatus = function(genericError:Object){<br />

// Your script would do something more meaningful here<br />

trace("An error has occurred. Please try again.");<br />

}<br />

See also<br />

onStatus (SharedObject.onStatus h<strong>and</strong>ler)<br />

System 607

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

Saved successfully!

Ooh no, something went wrong!