 			
 			stage.removeEventListener(Event.ADDED_TO_STAGE, displayObjectAddedToStageHandler);
 			stage.removeEventListener(Event.REMOVED_FROM_STAGE, displayObjectRemovedFromStageHandler);
-			
 			stage.removeEventListener(Event.RESIZE, stageResizedHandler);
 			
 			if (_stage3d != null)
 				_stage3d.visible = false;
 		}
 		
-		private function setupOnStage(stage : Stage, stage3dId : uint = 0) : void
+		private function setupOnStage(stage : Stage) : void
 		{
 			if (_autoResize)
 			{

			
			stage.addEventListener(Event.ADDED_TO_STAGE, displayObjectAddedToStageHandler);
			stage.addEventListener(Event.REMOVED_FROM_STAGE, displayObjectRemovedFromStageHandler);
			
			stage.addEventListener(Event.RESIZE, stageResizedHandler);
			
			setupOnStage(stage);

		}
		
		public function Viewport(antiAliasing	: uint	= 0,
								 stage3dId		: uint	= 0,
								 width			: uint 	= 0,
								 height			: uint	= 0)
		{
			_stage3dId = stage3dId;
			_antiAliasing = antiAliasing;
			_autoResize = width == 0 && height == 0;
			
			_width = width;
			_height = height;
