title: Actionscript 3.0 Popup
body: <p>I'm trying to get a popup message to display for 1 second when the right answer is selected. All this pop up says is "Right Answer". I have made a function that makes the popup visible and I have put setTimeout in an if state (this if statement is if the right answer is selected). My code below and I would appreciate any help at all! </p>
  
  <p>This is my function for the display </p>
  
  <pre><code>//------Popup--------// 
  
  right_ans.alpha = 0; //set to zero so message wont be displayed throughout game
  
  //--------Popup function-------// 
  
  function DisplayAnswer(event:MouseEvent):void{
  
  right_ans.alpha = 5;
  
  }
  </code></pre>
  
  <p>This is the if statement with the setTimeout </p>
  
  <pre><code>if(event.target == pig) //object
          {
              currentQuestion++;
              score = score + 5; 
              Score_txt.text = (score).toString(); 
              setTimeout(DisplayAnswer, 1000);
  
  
  
          } 
  </code></pre>