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 on 2011-6-9

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

package {
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var round:int = 0;
            for(var i:int = 0; i < 5; i++)
            {
                for(var j:int = 0; j<5; j++)
                {
                    round++;
                    var r:RoundRect = new RoundRect( 50, round );
                    r.x = j * 65 + 15;
                    r.y = i * 75 + 15;
                    
                    addChild( r );
                }
            }
        }
    }
}
import flash.text.TextField;
import flash.display.Sprite;

class RoundRect extends Sprite
{
    public function RoundRect( size:int, r:int )
    {
        var t:TextField = new TextField();
        addChild(t);
        t.autoSize = "left";
        t.text = r.toString() + " px";
        t.x = (size - t.width) / 2;
        
        graphics.beginFill(0);
        graphics.drawRoundRect( 0, t.height, size, size, r,r );
        graphics.endFill();
    }

}