title: Actions Script 3.0 if else statements
body: <p>need to do several things by it's click event. I'm a beginner to this, so is there any other way to write this code? by clicking this button, it goes to next frame and according to statement several buttons will be visible or not. I wrote the code this way and it says there are syntax error, but I couldn't find any. Hope you guys understand this and will help me. :) Thank you!</p>
  
  <pre><code>review_btn.addEventListener(MouseEvent.CLICK, review1)
  function review1(event:MouseEvent):void{
  
  if(rvw1 == "Correct"){ 
      gotoAndStop(3627);
      help1.visible = false
  
      }
  else{ 
      gotoAndStop(3627);
      help1.visible = true
  
  }
  }
  
  review_btn.addEventListener(MouseEvent.CLICK, review2)
  function review2(event:MouseEvent):void{
  
  if(rvw2 == "Correct"){ 
      gotoAndStop(3627);
      help2.visible = false
  
      }
  else{ 
      gotoAndStop(3627);
      help2.visible = true
  
  }
  }
  
  review_btn.addEventListener(MouseEvent.CLICK, review3)
  function review3(event:MouseEvent):void{
  
  if(rvw3 == "Correct"){ 
      gotoAndStop(3627);
      help3.visible = false
  
      }
  else{ 
      gotoAndStop(3627);
      help3.visible = true
  
  }
  }
  
  review_btn.addEventListener(MouseEvent.CLICK, review4)
  function review4(event:MouseEvent):void{
  
  if(rvw4 == "Correct"){ 
      gotoAndStop(3627);
      help4.visible = false
  
      }
  else{ 
      gotoAndStop(3627);
      help4.visible = true
  
  }
  }
  
  review_btn.addEventListener(MouseEvent.CLICK, review5)
  function review5(event:MouseEvent):void{
  
  if(rvw5 == "Correct"){ 
      gotoAndStop(3627);
      help5.visible = false
  
      }
  else{ 
      gotoAndStop(3627);
      help5.visible = true
  
  }
  }
  </code></pre>