1 Reply Latest reply on Apr 10, 2007 7:04 AM by maguskrool

    Targeting Button Inside loaded MovieClip

    JstMrd
      Hey there,

      I think I am loosing it ...

      Anyways, I have loaded a Movieclip onto the stage with:

      _root.attachMovie("MCCheck","MCCheck",(1001)); // Attaches the Check Button
      _root.MCCheck._x = 82;
      _root.MCCheck._y = 202;

      and would like to target the button (instace nameis butCheck) inside movieclip or just use a onRelease command to do something. I thought the code would go:

      _root.MCCheck.btCheck.onRelease = function() {
      trace("go");
      gotoAndPlay(1);
      //play();
      }

      But I am wrong.... and suggestion wher I went wrong

        • 1. Re: Targeting Button Inside loaded MovieClip
          maguskrool Level 1
          I'm not sure about this, as I'm not a very advanced programmer, but I guess that doesn't work because by the time you declare the onRelease, the MCCheck doesn't exist yet. My guess is you would have to find a way to declare the onRelease only after the attachMovie ends. Sorry for not providing a working solution, but perhaps this at least provided some insight.