Have you put any logging in place to see if the communication itself
is working, or are you just not seeing it change the media?
Looking at the code you have there it looks like you're trying to load
a file from the local FS, which I don't think will work if the movie
is loaded in a browser over HTTP (though I may be wrong. I'm still
new at this). It's possible the communication is working but the
action it's taking isn't. Try something simple first, like having one
movie send a string to another one to display. I find it's always
best to start with something simple so that there are less things that
could be broken, and then add more stuff onto it once it works.
-Andy
On 10/17/06, Martin Scott Goldberg <[EMAIL PROTECTED]> wrote:
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
_______________________________________________
[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