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

VR4b_DerPlatter

Get Adobe Flash player
by kazgo2 08 May 2016
    Embed
/**
 * Copyright kazgo2 ( http://wonderfl.net/user/kazgo2 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/bAGI
 */

package {
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.net.URLRequest;
    import flash.system.LoaderContext;
    import flash.system.Security;  
    import org.papervision3d.cameras.*;
    import org.papervision3d.view.*;
    import org.papervision3d.materials.*;
    import org.papervision3d.objects.primitives.*
    import org.papervision3d.materials.utils.*;
    [SWF(width = "465", height = "465", backgroundColor = "0", frameRate = "60")] 
    
    public class sphereOutside extends BasicView {
        private var sphere:Sphere;
        public function sphereOutside() {
            // BasicViewの初期化
            super(0, 0, true, false, CameraType.TARGET);

            Security.allowDomain("kazumiworx.com");
            Security.loadPolicyFile("http://kazumiworx.com/crossdomain.xml");
            
            // 画質を「低」にして高速化
            stage.quality = StageQuality.LOW;

            // マテリアル
            var material:BitmapFileMaterial = new BitmapFileMaterial("http://kazumiworx.com/kmmt16/images/DerPlatter.jpg", true);
            material.opposite = true;

            // 球体を作成
            sphere = new Sphere(material, 500, 30, 30);
            scene.addChild(sphere);
            
            // マウスのインタラクティブを設定しています
            addEventListener( Event.ENTER_FRAME, onEnterFrame );
            
            // レンダリングを開始します
            startRendering();
        }
        public function onEnterFrame(e:Event): void {
            sphere.rotationY += ( mouseX - stage.stageWidth /2 ) / 200;
            //sphere.rotationX += ( mouseY - stage.stageHeight/2 ) / 200;

            renderer.renderScene( scene, camera, viewport );
        }
    }
}