1 Reply Latest reply on Feb 21, 2008 6:32 AM by mgason

    making 1 SWF control another???

    texjgc Level 1

      I want to make 2 SWF movies and have one control the other. Kind of like a TV and remote control relationship.
      My setup idea is to have one SWF as the main site area for content and the other SWF (a button bar) is for controlling the content SWF movie.

      The part that trips me up about the whole thing is I wont be navigatin URL's I will need to have the 2nd SWF navigate the first SWF's frame position. So like I said kind of like a remote control and a TV.

      Anyone have any ideas how to do this?

      Im just not sure yet how to approach this.

      Thanks for any help.
        • 1. Re: making 1 SWF control another???
          Hi, I just had to learn this
          You need to set up a connection between the 2 swf's

          You set up an outgoing connection in the sender swf.
          In the sending swf put something like this
          It basically sends over a message to do the "DoThis" command.
          You can call it anything you like
          This example is attached to a button.

          buttonInstanceName.onRelease = function(){
          outgoing_lc = new LocalConnection();
          outgoing_lc.send("lc_name", "methodToExecute", "DoThis");
          delete outgoing_lc;

          In the receiver swf you set up a receiver connection then
          In the receiving swf you define what is actually involved in the "DoThis" command.
          Put this in a frame at the beginning of your movie

          incoming_lc = new LocalConnection();
          incoming_lc.methodToExecute = function (param) {
          if(param == "DoThis"){

          //what you want it to do like gotoFramex goes here


          for more info