5 Replies Latest reply on Jan 2, 2007 7:28 AM by GregNeumayer

    button activation

    Nancy_Gray Level 1
      I am embarrassed to ask this question. But how do you activate a button that is embedded in a movie clip? Do you use the linkage properties to export for ActionScript or is there another way?

      Gizay
        • 1. Re: button activation
          Shandy Elliott Level 1
          What do you mean by activate a button? Are you talking about enabling the button or where you can click it and perform some action? You don't need to do any linkage. You should just be able to create the proper path that leads to that button (assuming it has an instance name). Whatever instance name you have for the movie clip that contains the button, make sure that instance name is included in your scripting path. Your question seemed a little confusing, so if I didn't shed any light, then can you be a little more specific with your question?
          • 2. Re: button activation
            MoizeShah
            i would also like to create a botton but how do you create a rollover link like when you rollover it takes you to a differen frame i am trying to create something like on http://www.zune.net at the bottum of the page where multiple objects are moving when the mouse is over one
            • 3. Re: button activation
              GregNeumayer
              I'm also having a similar problem. Can you shed any light? I'm sure it's a stupid scope issue, but it's driving me mad today. I've got a prebuilt mc that has a bunch of movieclips inside of it. I've then attached the prebuilt mc to the stage dynamically at run-time. For some reason, the instanced mc's inside of it won't respond. Here's my code below. What am I missing?
              Thanks,
              Greg
              /////

              function instantiateOptions() {
              attachMovie("options_mc", "options_mc", 1000);
              options_mc.cost1_x.onPress = function(){
              trace("cost1_x pressed");
              }
              }
              • 4. Re: button activation
                Shandy Elliott Level 1
                Please, if you people have similar issues to a current post, PLEASE PLEASE PLEASE create your own topic and not add it to the original posting. This ONE post now has 3 different issues from 3 different people.
                • 5. Re: button activation
                  GregNeumayer Level 1
                  My apologies, Shandy. Sometimes it takes knowing the solution before knowing if you are experiencing the same problem or one best asked elsewhere.

                  Nonetheless, I'll summarize my solution here rather than make a new post to simply do so.

                  In my case, I created the problem by attaching a onRollOver call to the parent movie clip. By doing this, I couldn't assign new button states to it's children. The solution is to use another, perhaps invisible button that is not part of the parent, or create the button with something that is a child just like the other children, which will be buttons in themselves.

                  Gizay, there a lot of things that could potentially cause you to not be able to target your sub-buttons (like my example), but in general, you can simply target it using a relative path from you to the target. For example, in my case, I'd target the sub-button from the root like:
                  parent.child.onRollover=function(){trace("hi")};
                  but if I were writing my code from the parent's timeline (which I try not to do), it might look like:
                  child.onRollover=function(){trace("hi")};
                  You can also target from a child of the parent, to another child, which might look like:
                  this._parent.child.onRollOver=function(){trace("hi")};

                  Hope it helps.
                  -Greg