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:
  1. Create a new movieclip in the library
  2. Give it a significant name containing font information, p.e. "arial 11px center"; this allows for easy reuse of containers
  3. Link it to the class org.asapframework.management.lang.MultiLanguageTextContainer
  4. Inside the movieclip, create a dynamic textfield. Name it "tf_txt"
  5. Set font embedding as necessary
  6. Place instances of the library item on the stage where necessary.
  7. 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"
  8. In your application, load an xml file containing texts into the LanguageManager: LanguageManager.getInstance().loadXML("texts_en.xml");
This class can be used either

Summary


Instance properties
Instance methods
  • setData (inData:ItemData) : Void
    • IMultiLanguageTextContainer implementation Set the data for the container
  • setText (inText:String) : Void
    • IMultiLanguageTextContainer implementation Set the text for the container
  • toString : String
Event handlers
  • onLoad : Void
    • Handle MovieClip onLoad event
  • onUnload : Void
    • Handle MovieClip onUnload event

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

function setData (
inData:ItemData) : Void

IMultiLanguageTextContainer implementation
Set the data for the container
Parameters:
inData:
the object containing the data

setText

function setText (
inText:String) : Void

IMultiLanguageTextContainer implementation
Set the text for the container
Parameters:
inText:
the string containing the text

toString

function toString (
) : String

Event handlers

onLoad

private function onLoad (
) : Void

Handle MovieClip onLoad event

onUnload

private function onUnload (
) : Void

Handle MovieClip onUnload event