3 Replies Latest reply on Apr 22, 2006 8:29 PM by Newsgroup_User

    Jump To Frame and Play in Separate Movie

    raymbarr
      I have two completely separate .swf files being loaded into a web page. MovieA.swf is set to play on load and movieB.swf is set to be stopped on load.

      On the click of a button within movieA, I'm trying to get movieA.swf to tell movieB.swf to go to a certain frame and play.

      I've been searching on Google for hours now and not really found anything that works.

      Within movieA I've tried the following:

      on (release) {
      gotoAndPlay("_root.movieB", "15");
      }

      OR

      on (release) {
      gotoAndPlay("movieB", "15");
      }

      When I do this it just seems to play movieA. Note I also haven't found a way to "name" a movie. So I'm just calling the file name (movieA.swf) and I realize that's probably not right.

      It seems like it would be a common thing to do... anyone have any code that might work?

      Thank you,
      Raym




        • 1. Re: Jump To Frame and Play in Separate Movie
          Level 7

          "raymbarr" <webforumsuser@macromedia.com> wrote in message news:e2ehgu$b09$1@forums.macromedia.com...
          >I have two completely separate .swf files being loaded into a web page.
          > MovieA.swf is set to play on load and movieB.swf is set to be stopped on load.
          >
          > On the click of a button within movieA, I'm trying to get movieA.swf to tell
          > movieB.swf to go to a certain frame and play.

          If they are separate on the web page (not one loaded by the other) then you cannot use code in one to refer to the other except
          through a linkup code called localConnection.
          There are some examples of localConnection on my website..

          http://members.cox.net/4my2dogs/flash/
          tralfaz


          • 2. Jump To Frame and Play in Separate Movie
            raymbarr Level 1
            Awesome! That worked! Thank you so much.
            http://www.imagineave.com/web/index-3d.html
            (click the first or second picture - I haven't hooked up the rest yet). Basically the bottom movie tells the top movie (which starts off transparent) to go to a frame and play).

            I've been trying to get that for hours! Whooohooo!

            One thing I noticed - you're using

            on (release) {
            sendFrameNumber(2);
            }

            Is there a way to try "sendFrameLabel("slide1");

            so that you can refer to frame labels rather than frame numbers in case I later move things around in the movie?

            That's so great! I'm thrilled. Thanks!
            Raym
            • 3. Re: Jump To Frame and Play in Separate Movie
              Level 7

              "raymbarr" <webforumsuser@macromedia.com> wrote in message news:e2emk3$gan$1@forums.macromedia.com...
              > Awesome! That worked! Thank you so much.
              > http://www.imagineave.com/web/index-3d.html
              > I've been trying to get that for hours! Whooohooo!
              >
              > One thing I noticed - you're using
              >
              > on (release) {
              > sendFrameNumber(2);
              > }
              >
              > Is there a way to try "sendFrameLabel("slide1");
              >
              > so that you can refer to slide numbers rather than frame numbers in the other
              > movie?
              >
              > That's so great! I'm thrilled. Thanks!
              > Raym
              >

              Glad it helped. You can send and receive any kind of parameter so if you send a string like "gallery" then on the receiving end you
              can use that string as a label jump..

              // in the sending swf
              // connection name: lc_test
              // function to call: testme
              // parameter to send: string "gallery"

              outgoing_lc = new LocalConnection();
              outgoing_lc.send("lc_test", "testme", "gallery");
              delete outgoing_lc;


              // in the receiver swf file..
              // connection name: "lc_test"
              // function: testme
              // incoming string variable into: someLabelString

              incoming_lc = new LocalConnection();
              incoming_lc.connect("lc_test");

              incoming_lc.testme = function (someLabelString)
              {
              gotoAndPlay(someLabelString);
              }