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 2013-4-1

Get Adobe Flash player
by jkwestin 02 Apr 2013
/**
 * Copyright jkwestin ( http://wonderfl.net/user/jkwestin )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/9bn2
 */

package {

    import citrus.core.starling.StarlingCitrusEngine;
    import citrus.core.CitrusEngine;
    import citrus.core.starling.StarlingState;
    import citrus.physics.box2d.Box2D;
    import citrus.objects.Box2DPhysicsObject;
    import Box2D.Common.Math.b2Vec2;
    public class Main extends StarlingCitrusEngine {

        public function Main() {

            setUpStarling(true);
            state = new starlingState();

        }

    }

}


    class starlingState extends StarlingState {

        public function starlingState() {
            super();
        }

        override public function initialize():void {
            super.initialize();
            var box2D:Box2D=new Box2D("box2dworld",{gravity:new b2Vec2(0,5),visible:true});
            add(box2D);
            var ground:Box2DPhysicsObject=new Box2DPhysicsObject("ground",{x:320,y:480,width:640,height:40});

            ground.body.SetType(0);
            add(ground);
            add(new Box2DPhysicsObject("block 1",{x:380,y:440,width:40,height:40}));
            add(new Box2DPhysicsObject("block 2",{x:260,y:440,width:40,height:40}));
            add(new Box2DPhysicsObject("block 3",{x:320,y:400,width:160,height:40}));
            add(new Box2DPhysicsObject("block 4",{x:320,y:360,width:80,height:40}));
            add(new Box2DPhysicsObject("block 5",{x:300,y:320,width:120,height:40}));
            add(new Box2DPhysicsObject("block 6",{x:320,y:260,width:160,height:80}));
        }
    }