hold down mouse/finger to shoot
		
		
		var so;//ScreenOrganizer > IrisScreenOrganizer
		var root;//CanvasObjectContainer
		var title;//ScreenSkeleton
		var engine;//CanvasObjectContainer
		var timer;//IntervalController
		var circ;//Traveler
		var fRect;//Rectangle
		var circs = [];//of Travelers
		var bullets = [];//of BlittedTravelers
		var ship;//RotatingShooter
		var img;//.jpg or .png
		var wd;//WayDeterminer
		var mp;//MoverPoint
		var mouseIsDown = 0;
		var delta = 0;
		function init() {
			root = new tabageos.CanvasObjectContainer("root", 500, 500, null, "#FFffff");
			title = new tabageos.ScreenSkeleton(null, null, 500, 500, null, "#0000ff");
			title.floor.writeText("Title Screen", 215, 24, "Times", 24, "#000000");
			title.floor.writeText("Play!", 250 - 10, 250, "Times", 30, "#FF0000");
			engine = new tabageos.CanvasObjectContainer(null, 500, 500, null, "#6495ed");
			mp = new tabageos.MoverPoint(0,0);
			so = new tabageos.IrisScreenOrganizer(root, [title, engine]);
			title._screenOrg = so;
			title.establishClickArea("titleClick", this, "startButtonClick", 240,335,250-24,250);
			
			document.addEventListener("mouseup", handleMouseUp, false);
			document.addEventListener("mousedown", handleMouseDown, false);
			
			document.addEventListener("touchstart", handleMouseDown, false);
			document.addEventListener("touchend", handleMouseUp, false);
			
			document.addEventListener("mousemove", handleMouseMove, false);
			document.addEventListener("touchmove", handleMouseMove, false);
			
			img = new Image();
			img.onload = function(e) {
				so.changeScreen(0);//0 is the title screen
			}; img.src = "shipSheet.jpg";
		}
		
		function handleMouseDown(e) {
			mouseIsDown = 1;
		}
		function handleMouseUp(e) {
			mouseIsDown = 0;
		}
		function handleMouseMove(e) {
			if(e && e.targetTouches && e.targetTouches.length) {
				var i = 0;
				for (i; i < e.targetTouches.length; i++) {
					var touches = e.targetTouches[i];
					var tx = touches.pageX;
					var ty = touches.pageY;
					mp.x = tx; mp.y = ty;
				}
			} else {
				mp = tabageos.MouseController.mouseMoverPoint();
			}
		}
		function startButtonClick(e) {
			so.removeEventListener(tabageos.ScreenChangeEvent.SCREEN_CHANGE, "afterScreenChange", this);
			so.addEventListener(tabageos.ScreenChangeEvent.SCREEN_CHANGE, "startSomething", this);
			so.changeScreen(1);//1 is the engine
		}
		function startSomething(e) {

			so.removeEventListener(tabageos.ScreenChangeEvent.SCREEN_CHANGE, "startSomething", this);
			
			fRect = new tabageos.Rectangle(1,1,498,498);//x,y,width,height
			
			wd = new tabageos.WayDeterminer(0,engine.floor);//not being used, but is needed during construction of the RotatingShooter
			
			var rotateImg = new tabageos.CanvasObject(null, 168,168);//image to rotate in the middle of 3x its dimensions of blank space.
			rotateImg.copyPixels(img, new tabageos.Rectangle(0,0,168,168), new tabageos.MoverPoint(84,84), 56,56);
			
											//source, canvas, bulletCanvas, wd, fromRect, x, y, width, height, rotationImage, rotationFromRect, bulletFromRect
			ship = new tabageos.RotatingShooter(img,engine.floor,engine.floor,wd,new tabageos.Rectangle(56,56,56,56),250,250,56,56,rotateImg,new tabageos.Rectangle(0,0,168,168),new tabageos.Rectangle(56+28,56+28,4,4));
			ship.maxSpeed = 2;
			ship.maxForce = 3;
			ship.alwaysDisplayRotationOnly();//without calling this there would be an image underneath the rotating image, 
			//which is useful if for example you want to have a tank with just a turret on top that rotates.
			ship.setWallObject( new tabageos.Rectangle(0,0,500,500) );
			
			while(circs.length < 8) {
				circ = new tabageos.BlittedTraveler(img, engine.floor,new tabageos.Rectangle(141,180,20,20),1,1,20,20);
				circ._pos.x = Math.floor(Math.random() * 450);
				circ._pos.y = Math.floor(Math.random() * 500);
				circs.push(circ);
			}
			engine.floor.drawRect(new tabageos.Rectangle(0,0,500,500), "#000000");
			timer = new tabageos.IntervalController(16.6,0);
			timer.addEventListener(tabageos.IntervalEvent.INTERVAL, "loop", this);
			timer.start();
		}
		function loop(e) {
			engine.floor.drawRect(fRect, "#ffffff");
			
			ship.rotateWithMoverPoint(mp);//mp is defined during mouseMove, it is the mouse position or touch position.
			ship.easeTo(mp);
			ship.move();
			ship.blitt(null, ship._pos.subtractBy(28,28,1));//blitt with a middle offset point so that rotation looks right.
			if(mouseIsDown == 1) {
				delta += 33.3; var b;
				if(delta >= 499) {
					b = ship.shoot();//velocity and x and y are calculated during shoot, 
					b.setX(ship.x + 56 );b.setY(ship.y+56);//but in this case we move the bullets to come out from the center.
					bullets.push(b);//note; calling b.x = whatever or b.y does not actually set x and y. must use setX() and setY.
					delta = 0;
				}
			}
			var i = 0; var l = bullets.length;var ci = 0; var cl = circs.length;
				for(i;i 500 || b.y < 0 || b.y > 500) {//if it is out of bounds
						bullets.splice(bullets.indexOf(b), 1); break;//get rid of the bullet
					}
					b.move(); b.blitt();//otherwise move and blitt the bullet
					ci = 0;
					for(ci;ci 486 || circ._pos.y > 486) {
						//if it is touching the bounds, bounce off the bounds
						circ._veloc.x = -(circ._veloc.x*2); circ._veloc.y = -(circ._veloc.y*2);
					}
					circ._veloc.x *= .917;//then apply friction, which slows it down slowly
					circ._veloc.y *= .917;
					circ.move();circ.blitt();//finally, apply veolcity to actually move it and then draw it
				}
			
		}  init();