5 Replies Latest reply on Jun 15, 2012 4:27 AM by Ned Murphy

    Simple Quiz using ActionScript 1 and 2

    teacheRuss

      Having a few problems with a simple quiz game in Flash CS4. When the correct answer is typed into the insert text box the wrong message on the wrong frame comes up. I have tried using frame numbers in the actionscript and frame name flags. Whatever answer I type in it sends me to the wrong frame. I cannot see what the problem is. Could you take a look for me. I have added the code below. FOnts are embedded - have tried embed all etc. My button is called Ent and the input text box is A1. I have disabled keyboard short cuts in the flash player too. Tried running .SWF fiel on its own.

       

      From teh code below when my flash file runs I type in NaCl but the frame containg a message Q1F (below) is called. I cannot see why it is not Q1T. I have tried using 3 adn 4 in brackets without quotes as well. I have also tried using _root.gotoAndStop()

       

      Regards

       

      teacheRuss

       

       

      Ent.onRelease = function() {

       

          if(A1.text == "NaCl")
      {

               _root.gotoAndPlay("Q1T")

            } else  { 
               _root.gotoAndPlay("Q1F")

            }