5 Replies Latest reply on Nov 17, 2006 5:08 PM by ItsBlueB

    disable buttons throughout

      I am working on a quiz as an assignment at school. This is a begining flash class so obviously I don't know alot about ActionScripts. After my quiz loads and you get to the table of contents I only want one button enabled. After you complete the first section of the quiz I want the first button to become disabled and the next button to become enabled and continue in that fashion all the way to the total score button. I have tryed a few different things but they failed. I tryed this and this although I didn't know how to implement the last one. I also tryed using listeners from here, but I also didn't know how to implement that. I have uploaded my fla file so you can have a better idea of what I am trying to do. you can download it from here.
        • 1. Re: disable buttons throughout
          jeeepU Level 1
          hum...Why dont you grey out the buttons on the first table of contents and take away their button function, keeping the first one functional. Then create another frame after the first quiz with the new table of contents but this time have the second button functional and the rest greyed out. Keep doing this until all of the table of contents buttons are used. Does this make sense?
          • 2. Re: disable buttons throughout
            ItsBlueB Level 1
            I was thinking about doing that but we have to use action scripts in our assignment, otherwise I would do that. My assignment isn't due for about 3 weeks so i still have lots of time to try to figure this out.
            • 3. Re: disable buttons throughout
              jeeepU Level 1
              lol That would make sense given that this post is in the "actionscript" forum. Sorry I was no help!
              • 4. Re: disable buttons throughout
                ItsBlueB Level 1
                lol Thats quite alright, honest mistake, thanks anyway. :)
                • 5. Re: disable buttons throughout
                  ItsBlueB Level 1
                  I emailed my teacher and this is what he said...


                  To answer your question -
                  To make a button disabled until something else is done, use a variable and an if statement. You would create a variable for each section of the quiz, and set it to "No". The last question of each section would set the variable to "Yes". The buttons for the sections would have an if statement and only go to the questions if the variable says "Yes".

                  The button would have a script that says -

                  if(_root.Variable == "Yes"){

                  This would only go to frame 12 if the variable is "Yes" otherwise it would do nothing when it's clicked.