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

forked from: デバッグカメラ テスト

信号機カラー
w:前
s:後
a:左
d:右
q:-rotationZ
e:+rotationZ
以下略
Get Adobe Flash player
by Makoto_Tanaka 01 Feb 2010
    Embed
/**
 * Copyright Makoto_Tanaka ( http://wonderfl.net/user/Makoto_Tanaka )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/6z3f
 */

// forked from maccyan's デバッグカメラ テスト
//信号機カラー
//w:前
//s:後
//a:左
//d:右
//q:-rotationZ
//e:+rotationZ
//以下略
package {
    import flash.display.Sprite;
    import flash.events.*;
	import flash.filters.*;
	import flash.utils.*;
	import org.papervision3d.cameras.*;
	import org.papervision3d.core.effects.view.*;
	import org.papervision3d.lights.*;
	import org.papervision3d.materials.*;
	import org.papervision3d.materials.shadematerials.*;
	import org.papervision3d.materials.utils.*;
	import org.papervision3d.objects.primitives.*;
	
	[SWF(backgroundColor=0x121222)]
    public class FlashTest extends ReflectionView {
    	private var sphere:Sphere;
        public function FlashTest() {
            // write as3 code here..
            super(0,0,true,false,CameraType.DEBUG);
            
            var light:PointLight3D = new PointLight3D(true,false);
            var material:GouraudMaterial = new GouraudMaterial(light,0x03CA02,0x013201,25);
            var material2:GouraudMaterial = new GouraudMaterial(light,0xFFCC22,0xA4B3501,25);
            var material3:GouraudMaterial = new GouraudMaterial(light,0xFF4400,0x430E01,25);
            
            sphere = new Sphere(material,250,30,30);
            sphere.x = -580;
            scene.addChild(sphere);
            
            sphere = new Sphere(material2,250,30,30);
            scene.addChild(sphere);
            
            sphere =new Sphere(material3,250,30,30);
            sphere.x = 580;
            scene.addChild(sphere);
            
            surfaceHeight = -600;
            viewportReflection.filters = [new BlurFilter(8,8,3)];
            
            viewportReflection.alpha = 0.1;
            
            light.x = -1000;
            light.y = 1000;
            
            addEventListener(Event.ENTER_FRAME,loop);
        }
  		private function loop(e:Event):void{
  			  			
  			singleRender()
        }
    }
}