3 Replies Latest reply on Nov 5, 2007 7:03 AM by kglad

    Movieclips still on stage eventhough _visible = false

    i_am_captivate Level 1
      Hello,

      I have a scenario where a question will appear on the screen, and when the student thinks they know the answer, the facilitator clicks on the their name, and correct and incorrect boxes appear. If the answer is correct, all names on the screen SHOULD disappear and the next question appears. But right now, only the last name disappears. Attached is my code... what am I doing wrong?

      Any help would be greatly appreciated

      Thanks

      Doug

        • 1. Re: Movieclips still on stage eventhough _visible = false
          kglad Adobe Community Professional & MVP
          createTextField does not return a textfield (or anything else). and if you want mcCorText to not be visible after it's pressed, you'll need to use "this" instead of mcCorText within the mcCorText onPress handler.
          • 2. Re: Movieclips still on stage eventhough _visible = false
            i_am_captivate Level 1
            Thanks for the reply kglad,

            What I am looking to do is have mcName disappear when mcCorText is clicked on. For example, let's say there are 3 players. When the for loop runs, the name of the 3 players appear on the screen. The facilitator clicks on the name of the player who thinks they have the correct answer. Two MCs with the text Correct and Incorrect appear on the screen. All of this works correctly. When correct is clicked, I want the player names to disappear along with the correct and incorrect MCs. What is currently happening is that the Correct and incorrect MCs disappear; as they should, but only one of the player names disappear, rather than all three.

            For example:

            Step 1:
            --------------------------------------------------
            Question: blah blah blah

            Doug Fred Johnny
            --------------------------------------------------
            Step 2:

            Facilitator clicks on Fred

            Step 3:

            Window looks like this:
            -------------------------------------------
            Question: blah blah blah

            Doug Fred Johnny

            Correct Incorrect
            -----------------------------------------
            Step 4:

            Fred is right, so facilitator clicks "Correct'.

            When this happens, it looks like this:
            -------------------------------------------------------
            Next Question: yatta yatta yatta

            Doug Fred
            --------------------------------------------------

            "Johnny", "Correct" and "Incorrect " disappear, but the other players do not.

            If you look in the code, I have found that if you run "mcName._visible = false" before mcName.onPress = function(){ it works like it should, but put it in the on press handler and it looks like what I mentioned above

            Any help would be great

            Thanks!

            Doug

            • 3. Re: Movieclips still on stage eventhough _visible = false
              kglad Adobe Community Professional & MVP
              why would all three disappear? you're only coding for the last one to disappear.

              if you want all three to disappear, you need a for loop in mcCoreText.onPress that iterates through all three. or list them individually.