MultiLanguageTextContainer
| Kind of class: | class |
|---|---|
| Inherits from: | MovieClip |
| Implements: | |
| Classpath: | org.asapframework.management.lang.MultiLanguageTextContainer |
| File last modified: | Monday, 06 November 2006, 22:39:34 |
Basic implementation of IMultiLanguageTextContainer to be used with the LanguageManager to provide language dependent texts in an application.
To use this class, perform the following steps:
To use this class, perform the following steps:
- Create a new movieclip in the library
- Give it a significant name containing font information, p.e. "arial 11px center"; this allows for easy reuse of containers
- Link it to the class org.asapframework.management.lang.MultiLanguageTextContainer
- Inside the movieclip, create a dynamic textfield. Name it "tf_txt"
- Set font embedding as necessary
- Place instances of the library item on the stage where necessary.
- Name the instances whatever you like, as long as the name ends with underscore, followed by the integer id of the text to be associated with the instance. P.e.: "helloWorld_1"
- In your application, load an xml file containing texts into the LanguageManager:
LanguageManager.getInstance().loadXML("texts_en.xml");
- directly,
- as base class for further extension or
- as example of how to implement the IMultiLanguageTextContainer interface.
Summary
Instance methods
Instance properties
base_w
private base_w:Number
(read)
base_x
private base_x:Number
(read)
base_y
private base_y:Number
(read)
tf_txt
private tf_txt:TextField
(read)
Instance methods
setData
IMultiLanguageTextContainer implementation
Set the data for the container
Set the data for the container
Parameters:
inData:
the object containing the data
Specified by:
setText
function setText (
inText:String) : Void
IMultiLanguageTextContainer implementation
Set the text for the container
Set the text for the container
Parameters:
inText:
the string containing the text
Specified by:
toString
function toString (
) : String
Event handlers
onLoad
private function onLoad (
) : Void
Handle MovieClip onLoad event
onUnload
private function onUnload (
) : Void
Handle MovieClip onUnload event