ActionScript 2.0 Language Reference |
|
|
|
| ActionScript classes > Locale (mx.lang.Locale) > addDelayedInstance (Locale.addDelayedInstance method) | |||
Adds the {instance, string ID} pair into the internal array for later use. This is primarily used by Flash when the strings replacement method is "automatically at runtime".
Availability: ActionScript 2.0; Flash Player 7
instance:Object - Instance name of the text field to populate.
stringID:String - Language string ID.
The following example uses the autoReplace property and addDelayedInstance() method to populate a text field on the Stage with the IDS_GREETING string from the English XML language file.
import mx.lang.Locale;
greeting_txt.autoSize = "left";
Locale.autoReplace = true;
Locale.addDelayedInstance(greeting_txt, "IDS_GREETING");
Locale.loadLanguageXML("en");
|
|
|
|