 			
 			multitouch = new TextField();
 			multitouch.autoSize = TextFieldAutoSize.LEFT;
+			
+			idleTimer = new Timer(1000);
+			idleTimer.addEventListener(TimerEvent.TIMER, onTimer);
 			
 			switch(Multitouch.supportsTouchEvents)
 			{

	{
		private var coordinates:TextField;
		private var multitouch:TextField;
		private var offsetX:Number;
		private var offsetY:Number;
		

				stage.removeChild(shape);
			}
		}
		
		//--------------------------
		private function onTimer(e:TimerEvent):void {
			idleTimer.stop();
			initializeTouch();
		}
		
		private function initializeTimer():void {
			idleTimer.delay = 1000;
			if (!idleTimer.running) {
				idleTimer.start();
			}
		}
		
		private function initializeGestures():void {
			if (Multitouch.supportsGestureEvents) {
				Multitouch.inputMode = MultitouchInputMode.GESTURE;
				initializeTimer();
			}
		}
		
		private function initializeTouch():void {
			if (Multitouch.supportsTouchEvents) {
				Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
			}
		}
		
		private function onPan(e:TransformGestureEvent):void {
			var shape:Sprite = stage.getChildByName(currentTarget) as Sprite;
			switch(e.phase) {
				case GesturePhase.UPDATE:
					shape.x = shape.x + e.offsetX;
					shape.y = shape.y + e.offsetY;
					initializeTimer();
				break;
			}
		}
	}
}