addDelayedInstance (Locale.addDelayedInstance method)

public static addDelayedInstance(instance:Object, stringID:String) : Void

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

Parameters

instance:Object - Instance name of the text field to populate.

stringID:String - Language string ID.

Example

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");