In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

What is Flash for you?

Get Adobe Flash player
by ton 15 Apr 2009
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;
        }    
    }
}