4 Replies Latest reply on Mar 21, 2008 4:43 AM by johnd59898678

    Targeting & Triggering Nested MC

    johnd59898678 Level 1
      I have the attached script on Frame 1 at the root level of my file. It is being published in AS 2.0.

      I have a test button I have placed on it's own layer (inside another MovieClip with an Instance Name of Menu that will eventually contain other similar buttons). I have given this MovieClip(button) an Instance Name of WorksButton. Inside that container I have created another MovieClip that contains all the animated frames to be triggered by it's parent MovieClip as the various states are sensed.

      As you can see in the script I have Trace statements embedded in the RollOver, RollOut and Release functions and the Output window shows that all these states are being sensed at the right times and even disabling the button after clicked - so that appears to be working great. What is not working are the statements just beneath the Trace statements that tell the embedded MovieClip to Play the FadeIn/FadeOut animation, etc.

      What am I missing? The SWF is sensing the mouse states when it interacts with the ButtonMovieClip boundaries, but will not fire off the embedded button animation?

        • 1. Re: Targeting & Triggering Nested MC
          rlc5611 Level 1
          Try "this". You are getting confused on what "this" is. Within the onRollOver/RollOut functions, "this" refers to the button. Be careful with two things. MC buttons and button buttons behave differently. In an MC button, "this" is the MC. In a button button, "this" is the timeline containing the button.

          Also be aware that "Menu" is reserved word. Renaming might be a good plan.
          • 2. Re: Targeting & Triggering Nested MC
            johnd59898678 Level 1

            Thanks for the quick response!

            What you say makes sense. I think I made the changes you suggested, but still no animation? I am attaching the new code after changing "Menu" to "MainNav". The Trace text still appears in the output window for all three states, just no animation?. I went ahead and removed the "Stop" actions from the animation MC (WorksWord) and did a quick movie test and the animation looped perfectly so it really seems like a targeting issue? I am really stumped.
            • 3. Re: Targeting & Triggering Nested MC
              rlc5611 Level 1
              replace your




              and find out what "this" really is. Then you will see better how to target its children.

              • 4. Re: Targeting & Triggering Nested MC
                johnd59898678 Level 1

                How quickly one forgets if you do not do this all the time!. Thanks for the tip - that led me to the solution. It came back with _level0.MainNav.WorksButton as "this". So I changed to the attached code and it appears to be working now.

                Thanks for the help!