Star Orbit Demo

Flash 3D demo about objects orbiting stars

Star Orbit Demo

src/main.as


package {
	import com.cet.parallax.*;
	import com.hires.debug.*;
	
	import flash.display.*;
	import flash.text.*;
	
	//_________________________________________________________________
	//                                                  export settings	
 	[SWF(backgroundColor="0x000000", width="800", height="600")] 
	//_________________________________________________________________
	//                                                            class	
	public class main extends Sprite {
	//_________________________________________________________________
	//                                                        variables		
		private var debug:Stats;
	//_________________________________________________________________
	//                                                       initilizer
		public function main() {
			init();
			create();
		}
	//_________________________________________________________________
	//                                                       initilizer
		private function init():void {
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT; 
			stage.quality = StageQuality.MEDIUM;  
			stage.frameRate = 100; 
		}
	//_________________________________________________________________
	//                                                       background
		private function create():void { 
			var earthBox:Sprite = new Sprite();

			var bg:BGtop = new BGtop(0, 0);
			earthBox.graphics.beginBitmapFill(bg);
			earthBox.graphics.drawRect(0, 0, 800, 200);
			earthBox.graphics.endFill();
			
			var bg2:BGbottom = new BGbottom(0, 0);
			earthBox.graphics.beginBitmapFill(bg2);
			earthBox.graphics.drawRect(0, 200, 800, 400);
			earthBox.graphics.endFill();

			addChild(earthBox);
			
			debug = new Stats();
			debug.x = debug.y = 2;
			addChild(debug);
			
			var demo:PV3DView = new PV3DView();
			addChild(demo);
		}
	}
}

Download

raw zip tar