03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - 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.

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 />

addDelayedInstance (Locale.addDelayedInstance<br />

method)<br />

public static addDelayedInstance(instance:Object, stringID:String) : Void<br />

Adds the {instance, string ID} pair into the internal array for later use. This is primarily used<br />

by Flash when the strings replacement method is "automatically at runtime".<br />

Availability: <strong>ActionScript</strong> <strong>2.0</strong>; Flash Player 7<br />

Parameters<br />

instance:Object - Instance name of the text field to populate.<br />

stringID:String - <strong>Language</strong> string ID.<br />

Example<br />

The following example uses the autoReplace property <strong>and</strong> addDelayedInstance() method<br />

to populate a text field on the Stage with the IDS_GREETING string from the English XML<br />

language file.<br />

import mx.lang.Locale;<br />

greeting_txt.autoSize = "left";<br />

Locale.autoReplace = true;<br />

Locale.addDelayedInstance(greeting_txt, "IDS_GREETING");<br />

Locale.load<strong>Language</strong>XML("en");<br />

addXMLPath (Locale.addXMLPath method)<br />

public static addXMLPath(langCode:String, path:String) : Void<br />

Adds the {languageCode <strong>and</strong> languagePath} pair into the internal array for later use. This is<br />

primarily used by Flash when the strings replacement method is "automatically at<br />

runtime" or "via <strong>ActionScript</strong> at runtime".<br />

Availability: <strong>ActionScript</strong> <strong>2.0</strong>; Flash Player 7<br />

Locale (mx.lang.Locale) 741

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

Saved successfully!

Ooh no, something went wrong!