What is Flash for you?
package {
import flash.display.Sprite;
import flash.system.Capabilities;
import flash.text.TextField;
import flash.text.TextFormat;
public class WhatIsFlash extends Sprite {
private namespace english;
private namespace japanese;
private var language:Namespace;
private var txt:TextField;
public function WhatIsFlash():void {
init();
language::question();
}
english function question():void {
txt.text = "What is Flash for you?";
}
japanese function question():void {
txt.text = "あなたにとってFlashとはなんですか?";
}
private function init():void {
txt = new TextField();
txt.autoSize = "left";
txt.defaultTextFormat = new TextFormat(null, 20, 0x0077ff, true);
addChild(txt);
language = Capabilities.language == "ja"? japanese : english;
}
}
}