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 2009-7-30

Get Adobe Flash player
by zsp 29 Jul 2009
    Embed
/**
 * Copyright zsp ( http://wonderfl.net/user/zsp )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/1hKR
 */

package {
    import org.papervision3d.core.proto.*;
    import org.papervision3d.objects.primitives.*;
    import org.papervision3d.materials.*
    import org.papervision3d.view.BasicView;
    
    import flash.display.Sprite;
    import flash.events.*;
    
    public class FlashTest extends Sprite {
        private var sphere: Sphere;
        private var world: BasicView;
        private var mat: MaterialObject3D;
        
        public function FlashTest() {
            world = new BasicView();
            addChild(world);
            
            mat = new WireframeMaterial(0x808080);
            sphere = new Sphere(mat,300,8,8);
            world.scene.addChild(sphere);
            world.startRendering();
            
            addEventListener(Event.ENTER_FRAME, mainloop);
        }
        
        private function mainloop(e:Event):void{
            sphere.rotationZ += 5;
            sphere.rotationX += 3;
        }
    }
}