all groups > flash actionscript > august 2006 >
You're in the

flash actionscript

group:

communication between swfs



communication between swfs cbthom
8/6/2006 6:03:59 PM
flash actionscript: Is it possible to have multiple functions execute between 2 swfs? Example: I
have no problem getting one button in one flash movie to play one movie clip in
another movie. But what I want to do is have buttonS in the first movie play
different movie clips OR go to and play different frames. Seems like this
should be simple. Thanks for your help.



pic1_btn.onRelease = function() {
var mySender_lc:LocalConnection = new LocalConnection();
mySender_lc.send("incomingMessage", "onReceive");
mySender_lc.close();
}

// receiver script
var myReceiver_lc:LocalConnection = new LocalConnection();
myReceiver_lc.onReceive = function() {
test1_mc.play();
};
myReceiver_lc.connect("incomingMessage");
Re: communication between swfs kglad
8/6/2006 7:51:02 PM
have mySend_lc send another (string) parameter designating the movieclip you
want to trigger to play in myReceiver_lc.onReceive and use bracket notation in
your onReceive handler to convert that string into a movieclip.
AddThis Social Bookmark Button