Agnitio Dynamic Asset API

From Agnitio WIKI

Jump to: navigation, search

To use editable texts API you have to use StringManager.as class in your asset and initialize default values:

 import com.agnitio.strings.StringManager;
 
 if (StringManager.textStrings == null) {
 	StringManager.textStrings = {
 		"MY_LABEL_1" : "Label 1",
 		"MY_LABEL_2" : "Label 2",
 		"MY_LABEL_3" : "Label 3"
 	}
 }

Then create a text field with the instance name textField.

Wrap it into the movie clip inherited from EditableTextFieldMovieClip.as

Put it on the stage and use the correspondent ID (e. g. MY_LABEL_1) as an instance name.

See also

Personal tools