4 Replies Latest reply on Jun 9, 2009 6:53 AM by David Beedle

    Button click not regognized

    David Beedle

      I'll try and be brief concerning this puzzling dilemma.

       

      • I have a movie clip on stage; instance name: "slide_mc"
      • on the enterFrame of slide_mc, I fill slide_mc by using:
        • this.attachMovie (_global.myNewCip,"newMC",1);  // _global.myNewCip holds the linkage identifier
      • Throughout my swf, I use attachMovie to swap out new movie clips in slide_mc like this:
        • this.slide_mc.unloadMovie ();  //clear contents of slide_mc
        • slide_mc.attachMovie  (_global.myNewCip,"newMC",1);
      • There is a button on the movie clip I just attached to slide_mc. Its instance name is: "pause_btn"
      • From the main timeline I try to detect a mouse click by using this code:
          • this.slide_mc.newMC.pause_btn.onRelease = function () {
          •     trace ("clicked pause");
          • };

         

        The click is detected only for the first time I use attachMovie. After that, I get nothing. I thought it was because I was using "unloadMovie" but I've tested for that and that's not it.

         

        In my brevity, if my problem is unclear, let me know and I'll supply more info

         

        All code is in frame 1

         

        Thanks for any help!

         

        David