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

practice

Get Adobe Flash player
by 3dash 03 Jul 2012
    Embed
/**
 * Copyright 3dash ( http://wonderfl.net/user/3dash )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/x4LY
 */

package {
    import flash.display.*;
    import flash.events.*;
    import org.papervision3d.lights.PointLight3D;
    import org.papervision3d.materials.utils.MaterialsList;
    import org.papervision3d.objects.*;
    import org.papervision3d.objects.primitives.*;
    import org.papervision3d.materials.shadematerials.FlatShadeMaterial;
    import org.papervision3d.view.BasicView;
    import org.papervision3d.materials.ColorMaterial;
    import org.papervision3d.objects.primitives.Plane;

    public class FlashTest extends BasicView{
        private var field:DisplayObject3D;
        private var cube:Cube;
        
        public function FlashTest() {
            
            camera.y = 400;
            
            field = new DisplayObject3D();
            scene.addChild(field);
            var light:PointLight3D = new PointLight3D();
            light.y = 2000;
            var material:FlatShadeMaterial = new FlatShadeMaterial(light, 0x3399CC, 0x333333);
            cube = new Cube(new MaterialsList({all:material}), 500 ,500, 500, 1);
            camera.target = cube;
            field.addChild(cube);
            
            
            startRendering();
            
            stage.addEventListener(Event.ENTER_FRAME, _enterframeAct);
        }
        
        private function _enterframeAct(e:Event):void{
            cube.rotationX += 2;
        }

    }
}