flash on 2012-3-1

by hacker_tmbt9fl2
♥0 | Line 18 | Modified 2012-05-18 12:21:44 | MIT License
play

ActionScript3 source code

/**
 * Copyright hacker_tmbt9fl2 ( http://wonderfl.net/user/hacker_tmbt9fl2 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ovaI
 */

package {
    import flash.text.TextFormat;
    import flash.text.TextField;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var fld:TextField = new TextField();
            var fmt:TextFormat = new TextFormat("_sans", 14);
            fld.defaultTextFormat = fmt;
            var url:String = loaderInfo.url;
            fld.width = 200;
            fld.wordWrap = true;
            //fld.text = (url.indexOf("staging") != -1) ? "true" : "false";
            fld.htmlText = '<font color="#003366"><u><a href="http://google.co.jp/" target="_blank">Google</a></u></font>';
            fld.width = fld.textWidth * 1.2;
            addChild(fld);
        }
    }
}