5 Replies Latest reply on Mar 10, 2010 7:27 PM by bizzzel

    Button inside a movie clip controlling main timeline

    bizzzel Level 1

      Hello-

       

      I have a movie clip on the main stage- inside that movie clip is a button- I want that button to contol a function on the main timeline-

       

       

      example: Button Script

       

      closeAll_btn.addEventListener(MouseEvent.MOUSE_DOWN, goCloseAll);

       

      function goCloseAll(e:MouseEvent):void {


        ****don't know what to put here to activate "closeAllOpenMovieClips" function on main stage****


      }

       

       

      example: Main Stage Timeline Script

       

      function closeAllOpenMovieClips():void {
          trek_mc.gotoAndStop(1);
          lost_arts_mc.gotoAndStop(1);
          rain_mc.gotoAndStop(1);
          vintage_mc.gotoAndStop(1);
      }


      ***don't know if I need more script on Main Stage Timeline that just "function" ***

       

      Thanks - Ben L