flash on 2009-11-4

by shaneGirish
♥0 | Line 43 | Modified 2009-11-04 02:14:42 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.*;
    import flash.events.*;
    import flash.filters.*;
    import flash.geom.*;
    import flash.text.*;
    import flash.utils.*;
    
    [SWF(width = "800", height = "600", backgroundColor = "0", frameRate = 90)]

    public class FlashTest extends Sprite {
        public function FlashTest() {
           setupUI();
        }
        
        private function setupUI():void
        {
            var bmp:Bitmap = new Bitmap(new BitmapData(10, 10, false, 0xFFFFFF));
            bmp.x = 10;
            bmp.y = 26;
            addChild(bmp);
            
            var txtFormat:TextFormat = new TextFormat();
            txtFormat.font = "Arial";
            
            var text1:TextField = new TextField();
            text1.selectable = false;
            text1.defaultTextFormat = txtFormat;
            text1.x = 8;
            text1.y = 6;
            text1.autoSize = "left";
            text1.htmlText = "<font color='#FFFFFF' size='14'>Room : Chinnu</font>";
            addChild(text1);
            
            var text:TextField = new TextField();
            text.selectable = false;
            text.defaultTextFormat = txtFormat;
            text.x = 25;
            text.y = 24;
            text.htmlText = "<font color='#FFFFFF' size='9'>YOUR COLOR</font>";
            addChild(text);
            
            // BackGround Color
            var bgMatrix:Matrix = new Matrix();
            bgMatrix.rotate(90 * Math.PI / 180);
            graphics.clear()
            graphics.beginGradientFill("linear", [0x332244, 0x000000], [100, 100], [0, 255], bgMatrix);
            graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
        }
       
    }
}