 		
 		private var itemsToAnimate:Vector.<Item>;
 		
+		/* for quiz declaration */
+		//for managing questions:
+        private var quizQuestions:Array;
+        private var currentQuestion:QuizQuestion;
+        private var currentIndex:int = 0;
+        //the buttons:
+        private var prevButton:Button;
+        private var nextButton:Button;
+        private var finishButton:Button;
+        //scoring and messages:
+        private var score:int = 0;
+        private var statusT:TextField;
+		/*end quiz declaration */
+		/** Font - Regular text. */
+		private var fontRegular:Font;
+		/** Is game currently in paused state? */
+		private var gamePaused:Boolean = false;
+		
 		public function GamePlay() {
 			// constructor code
 			super();

				{
					itemsToAnimate.splice(i,1);
					this.removeChild(itemToTrack);
				}
				if(itemToTrack.x < -50)
				{
					itemsToAnimate.splice(i,1);

		
		private function onGameTick(event:Event):void
		{
			if (!gamePaused)
			{
				switch(gameState)
				{
					case "idle":
						//take off
						if(hero.x < stage.stageWidth * 0.5 * 0.5)
						{
							hero.x += ((stage.stageWidth * 0.5 * 0.5 + 10)-hero.x)*0.05;
							hero.y = stage.stageHeight * 0.5;
							
							playerSpeed += (MIN_SPEED - playerSpeed)* 0.05;
							bg.speed = playerSpeed * elapsed;
						}
						else
						{
							gameState = "flying";
						}
						break;
					case "flying":
					
						if(hitObstacle <= 0)
						{
							hero.y -= (hero.y - touchY) * 0.1;
							
							if(-(hero.y - touchY)<150 && -(hero.y - touchY)>-150)
							{
								hero.rotation = deg2rad(-(hero.y -touchY) * 0.2);
							}
							if(hero.y > gameArea.bottom - hero.height * 0.5)
							{
								hero.y = gameArea.bottom - hero.height * 0.5;
								hero.rotation = deg2rad(0);
							}
							if(hero.y < gameArea.top + hero.height * 0.5)
							{
								hero.y = gameArea.top + hero.height * 0.5;
								hero.rotation = deg2rad(0);
							}
	
						}
						else
						{
							hitObstacle--;
							cameraShake();
						}
						 
						playerSpeed -= (playerSpeed - MIN_SPEED) * 0.01;
						bg.speed = playerSpeed * elapsed;
						scoreDistance += (playerSpeed * elapsed)*0.1;
						
						initObstacle();
						animateObstacles();
						
						createFoodItems();
						animateItems();
						break;
					case "over":
					break;
				}
			}
		}
		
