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

Flash CS5 ICON

inspired by:
http://wonderfl.net/c/nMVR
Get Adobe Flash player
by matacat 09 Feb 2011
    Embed
/**
 * Copyright matacat ( http://wonderfl.net/user/matacat )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ysQp
 */

package
{
    import flash.display.Sprite;
    
    public class Main extends Sprite
    {
        public function Main()
        {
            var i:FlashCS5Icon = new FlashCS5Icon();
            i.scaleX = 2;
            i.scaleY = 2;
            i.x      = stage.stageWidth  - i.width  >> 1;
            i.y      = stage.stageHeight - i.height >> 1;
            addChild(i);
        }
    }
}

import flash.display.Graphics;
import flash.display.Shape;
import flash.filters.DropShadowFilter;
import flash.geom.Matrix;

class FlashCS5Icon extends Shape
{
    private static const FL_C:Vector.<int>       = new <int>   [    1,     2,     2,     2,     2,     2,     2,     2,      2,      2,      1,      2,       2,                   3,         2,                 3,               3];
    private static const FL_D:Vector.<Number>    = new <Number>[48,42, 94,42, 95,57, 64,57, 64,77, 92,77, 92,91, 64,91, 64,123, 48,123, 104,42, 120,42, 120,109, 120,113,125.5,111.5, 125.5,122, 121.5,124,117,124, 104,124,104,112];
    private static const BODY_C:Vector.<int>     = new <int>   [  1,     2,       2,     2];
    private static const BODY_D:Vector.<Number>  = new <Number>[8,8, 160,8, 160,160, 8,160];
    private static const TOP_C:Vector.<int>      = new <int>   [  1,     2,     2,   2];
    private static const TOP_D:Vector.<Number>   = new <Number>[0,0, 152,0, 152,8, 8,8];
    private static const LEFT_C:Vector.<int>     = new <int>   [  1,   2,     2,     2];
    private static const LEFT_D:Vector.<Number>  = new <Number>[0,0, 8,8, 8,160, 0,152];
    private static const WHOLE_C:Vector.<int>    = new <int>   [  1,     2,     2,     2,       2,     2,     2];
    private static const WHOLE_D:Vector.<Number> = new <Number>[0,0, 152,0, 152,8, 160,8, 160,160, 8,160, 0,152];
    
    public function FlashCS5Icon()
    {
        var g:Graphics = graphics,
            m:Matrix   = new Matrix();
        
        m.createGradientBox(152, 8);
        g.beginGradientFill("linear", [0xf9a257, 0xf58945], [1, 1], [0, 255], m);
        g.drawPath(TOP_C, TOP_D);
        
        m.createGradientBox(8, 160, Math.PI / 2);
        g.beginGradientFill("linear", [0x91191e, 0x4e111d], [1, 1], [0, 255], m);
        g.drawPath(LEFT_C, LEFT_D);
        
        m.createGradientBox(152, 152, Math.PI / 2, 8, 8);
        g.beginGradientFill("linear", [0xdc313d, 0x7a1325], [1, 1], [0, 255], m);
        g.drawPath(BODY_C, BODY_D);
        
        m.createGradientBox(160, 160, 0, 0, -32);
        g.beginGradientFill("radial", [0xf9a257, 0xf37037], [1, 1], [0, 255], m);
        g.drawPath(FL_C, FL_D);
        
        // circle -> x: 56, y: -64, r: 256
        m.createGradientBox(512, 512, 0, -200, -320);
        g.beginGradientFill("radial", [0x000000, 0x000000, 0x000000], [0, 0, 0.25], [0, 192, 255], m);
        g.drawPath(WHOLE_C, WHOLE_D);
        
        filters = [new DropShadowFilter(16, 45, 0x000000, 0.75, 32, 32, 1, 3)];
    }
}