Hey all, I'm trying to use LocalConnection to allow communication between
two flash movies on the same page. One movie is a basic media player and
the other one is a simple button that is being used to "trigger" the
player (which will be expanded to actually send the location of the file).
I started with working code for the media player movie, and tried
expanding it to use LocalConnection.
As the code stands right now, the button doesn't appear to be
communicating with the player or causing it to load the desired music
file. Are there any issues with dynamically loading a target using
setMedia?
Here's the code for the player:
initialize();
receiving_lc.connect("myConnections");
function initialize()
{
my_display.associateController(my_controller);
my_controller.controllerPolicy = "on";
var receiving_lc:LocalConnection = new LocalConnection();
receiving_lc.methodToExecute = function(param1:String, param2:String)
{
my_display.setMedia("C:/inmylife.mp3", "MP3");
}
}
Here's the code for the button movie:
var sending_lc:LocalConnection = new LocalConnection();
play_button.onRelease = function()
{
sending_lc.send("myConnections", "methodToExecute", "C:/inmylife.mp3",
"MP3");
}
Any help would be appreciated.
Marty
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com