2 Replies Latest reply on Dec 4, 2007 1:43 AM by TangentGraphic

    MCs speaking to each other

    TangentGraphic Level 1
      Hi, the main movie of my website loads the following movies:
      loadMovieNum("main_menu.swf", 10);
      loadMovieNum("news.swf", 2);
      loadMovieNum("grid.swf", 1);

      I have a button on mc "main_menu.swf". When this button is pressed I want mc "grid.swf" to:
      gotoAndPlay('play');

      I have been trying "_root.grid.gotoAndPlay('play');" amongst others but no joy.

      Is this possible?

      many thanks
        • 1. Re: MCs speaking to each other
          Level 7
          TangentGraphic,

          > I have been trying "_root.grid.gotoAndPlay('play');" amongst
          > others but no joy.

          Since you used loadMovieNum() to load grid.swf into level 1, you'll have
          to reference _level1 in order to reach that SWF. (The _root property refers
          to the currently active level, which is _level0 from the main timeline.
          _level1.gotoAndPlay("play"); should do it. There is no "grid" object
          reference to speak of in this context, because loadMovieNum() doesn't allow
          you to give instance names.

          You might want to experiment with loadMovie(), or even better, the
          MovieClipLoader class, since both of those allow you to route the incoming
          SWF into a movie clip symbol with an instance name. (Provide instance names
          via the Property inspector.) MovieClipLoader even provides events to let
          you know when the content has loaded.


          David Stiller
          Co-author, Foundation Flash CS3 for Designers
          http://tinyurl.com/2k29mj
          "Luck is the residue of good design."


          • 2. Re: MCs speaking to each other
            TangentGraphic Level 1
            Many thanks - this works perfect.
            Much appreciate!