flash on 2012-2-5

by Joe.Brant
♥0 | Line 15 | Modified 2012-02-05 02:14:40 | MIT License
play

ActionScript3 source code

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

package {
    import flash.text.TextField;
    import flash.text.engine.TextLine;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var str: String = '1, 2, 3, h, 5, 6, 7, 8.89, 9, 10, 11, 12, 13';
            var t: TextField = new TextField();
            t.width = 300;
            var a: Vector.<Number> = new Vector.<Number>(str.split(/[^0-9.]/));
            t.text = a.join('  ');
            addChild(t); 
        }
    }
}