Re: [Flashcoders] LocalConnection and Media Components?
I downloaded your examples and they worked fine both in the IDE and the browser. I'm going to just try and rebuild from those. As I stated, I already had coded a working player (with static file location), so I'll try and merge your localconnection examples and go from there. Thanks for your help and time. Marty Start by running both swf's in the IDE, so you can see the trace output. Once you got that working, try in a browser and see if the output is displayed in the textfield. view example http://muzakdeezign.com/downloads/localconn/ download example http://muzakdeezign.com/downloads/localconn/localconn.zip regards, Muzak - Original Message - From: Martin Scott Goldberg [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, October 28, 2006 5:57 AM Subject: Re: [Flashcoders] LocalConnection and Media Components? Hi Ray, that didn't work either. Changed the code to reflect those help pages as well, and that didn't work either. Here's the sending code: play_button.onRelease = function() { var sending_lc:LocalConnection = new LocalConnection(); sending_lc.send(_myConnections, setMedia, inmylife.mp3, MP3); } Here's the recieving code: _root.my_display.associateController(my_controller); _root.my_controller.controllerPolicy = on; var receiving_lc:LocalConnection = new LocalConnection(); function setMedia(file:String, type:String){ _root.my_display.setMedia(file, type); } receiving_lc.allowDomain = function():Boolean { return true; } receiving_lc.connect(_myConnections); This is getting really dissheartening that there's this much of a problem to do what should be a simple function. Marty ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
Hi, in your receiving LocalConnection object add allowDomain: this.receiving_lc.allowDomain = function():Boolean { return true; } Also, use an underscore at the front of your connection name: _MyConnections. See the docs for more info: http://livedocs.macromedia.com/flash/mx2004/main_7_2/1422.html http://livedocs.macromedia.com/flash/mx2004/main_7_2/1425.html On 10/27/06, Martin Scott Goldberg [EMAIL PROTECTED] wrote: Martin, Sorry I'm just getting back to you, was out of town for a wedding. You have things a bit in a weird order in the receiving swf. Also, receiving_lc outside and inside the initialize function are 2 differenct variables/instances. receiving_lc in the initialize function is local to the function, because of the var keyword. And nested functions are a 'no no'.. If you're coding in the main timeline, try this: Yes, I'm coding in the main timeline. I have the following code now (after modding yours) and I still can't get it to work: import mx.utils.Delegate; my_display.associateController(my_controller); my_controller.controllerPolicy = on; function setMedia(file:String, type:String){ this.my_display.setMedia(file, type); } var receiving_lc:LocalConnection = new LocalConnection(); this.receiving_lc.setMedia = Delegate.create(this, this.setMedia); this.receiving_lc.connect(myConnections); In the button movie I have the following code in the main timeline: var sending_lc:LocalConnection = new LocalConnection(); sending_lc.connect(myConnections); play_button.onRelease = function() { sending_lc.send(myConnections, setMedia, inmylife.mp3, MP3); } For the test HTML, I have following code (created by merging the two html's created by publishing: html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleplayer/title /head body bgcolor=#ff !--url's used in the movie-- !--text used in the movie-- !-- saved from url=(0013)about:internet -- object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0; width=700 height=200 id=player align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=player.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=player.swf quality=high bgcolor=#ff width=700 height=200 name=player align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0; width=30 height=32 id=play align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=play.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=play.swf quality=high bgcolor=#ff width=30 height=32 name=play align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object /body /html Could it be I have to allow connections from this domain? (I saw another recent topic on that here). Marty ___ Flashcoders@chattyfig.figleaf.com 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 -- Cheers, Ray Chuan ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
Hi, setMedia should be defined on the LocalConnection instance: receiving_lc.setMedia = function(file:String, type:String):Void { //do stuff }; On 10/28/06, Martin Scott Goldberg [EMAIL PROTECTED] wrote: Hi Ray, that didn't work either. Changed the code to reflect those help pages as well, and that didn't work either. Here's the sending code: play_button.onRelease = function() { var sending_lc:LocalConnection = new LocalConnection(); sending_lc.send(_myConnections, setMedia, inmylife.mp3, MP3); } Here's the recieving code: _root.my_display.associateController(my_controller); _root.my_controller.controllerPolicy = on; var receiving_lc:LocalConnection = new LocalConnection(); function setMedia(file:String, type:String){ _root.my_display.setMedia(file, type); } receiving_lc.allowDomain = function():Boolean { return true; } receiving_lc.connect(_myConnections); This is getting really dissheartening that there's this much of a problem to do what should be a simple function. Marty Hi, in your receiving LocalConnection object add allowDomain: this.receiving_lc.allowDomain = function():Boolean { return true; } Also, use an underscore at the front of your connection name: _MyConnections. See the docs for more info: http://livedocs.macromedia.com/flash/mx2004/main_7_2/1422.html http://livedocs.macromedia.com/flash/mx2004/main_7_2/1425.html On 10/27/06, Martin Scott Goldberg [EMAIL PROTECTED] wrote: Martin, Sorry I'm just getting back to you, was out of town for a wedding. You have things a bit in a weird order in the receiving swf. Also, receiving_lc outside and inside the initialize function are 2 differenct variables/instances. receiving_lc in the initialize function is local to the function, because of the var keyword. And nested functions are a 'no no'.. If you're coding in the main timeline, try this: Yes, I'm coding in the main timeline. I have the following code now (after modding yours) and I still can't get it to work: import mx.utils.Delegate; my_display.associateController(my_controller); my_controller.controllerPolicy = on; function setMedia(file:String, type:String){ this.my_display.setMedia(file, type); } var receiving_lc:LocalConnection = new LocalConnection(); this.receiving_lc.setMedia = Delegate.create(this, this.setMedia); this.receiving_lc.connect(myConnections); In the button movie I have the following code in the main timeline: var sending_lc:LocalConnection = new LocalConnection(); sending_lc.connect(myConnections); play_button.onRelease = function() { sending_lc.send(myConnections, setMedia, inmylife.mp3, MP3); } For the test HTML, I have following code (created by merging the two html's created by publishing: html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleplayer/title /head body bgcolor=#ff !--url's used in the movie-- !--text used in the movie-- !-- saved from url=(0013)about:internet -- object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0; width=700 height=200 id=player align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=player.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=player.swf quality=high bgcolor=#ff width=700 height=200 name=player align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0; width=30 height=32 id=play align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=play.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=play.swf quality=high bgcolor=#ff width=30 height=32 name=play align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object /body /html Could it be I have to allow connections from this domain? (I saw another recent topic on that here). Marty ___ Flashcoders@chattyfig.figleaf.com 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 -- Cheers, Ray Chuan ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier
Re: [Flashcoders] LocalConnection and Media Components?
I forgot to mention that there is a risk that your variables can go out of scope, especially for your receiver. Might want to consider this is it still doesn't work. On 10/28/06, Ray Chuan [EMAIL PROTECTED] wrote: Hi, setMedia should be defined on the LocalConnection instance: receiving_lc.setMedia = function(file:String, type:String):Void { //do stuff }; On 10/28/06, Martin Scott Goldberg [EMAIL PROTECTED] wrote: Hi Ray, that didn't work either. Changed the code to reflect those help pages as well, and that didn't work either. Here's the sending code: play_button.onRelease = function() { var sending_lc:LocalConnection = new LocalConnection(); sending_lc.send(_myConnections, setMedia, inmylife.mp3, MP3); } Here's the recieving code: _root.my_display.associateController(my_controller); _root.my_controller.controllerPolicy = on; var receiving_lc:LocalConnection = new LocalConnection(); function setMedia(file:String, type:String){ _root.my_display.setMedia(file, type); } receiving_lc.allowDomain = function():Boolean { return true; } receiving_lc.connect(_myConnections); This is getting really dissheartening that there's this much of a problem to do what should be a simple function. Marty Hi, in your receiving LocalConnection object add allowDomain: this.receiving_lc.allowDomain = function():Boolean { return true; } Also, use an underscore at the front of your connection name: _MyConnections. See the docs for more info: http://livedocs.macromedia.com/flash/mx2004/main_7_2/1422.html http://livedocs.macromedia.com/flash/mx2004/main_7_2/1425.html On 10/27/06, Martin Scott Goldberg [EMAIL PROTECTED] wrote: Martin, Sorry I'm just getting back to you, was out of town for a wedding. You have things a bit in a weird order in the receiving swf. Also, receiving_lc outside and inside the initialize function are 2 differenct variables/instances. receiving_lc in the initialize function is local to the function, because of the var keyword. And nested functions are a 'no no'.. If you're coding in the main timeline, try this: Yes, I'm coding in the main timeline. I have the following code now (after modding yours) and I still can't get it to work: import mx.utils.Delegate; my_display.associateController(my_controller); my_controller.controllerPolicy = on; function setMedia(file:String, type:String){ this.my_display.setMedia(file, type); } var receiving_lc:LocalConnection = new LocalConnection(); this.receiving_lc.setMedia = Delegate.create(this, this.setMedia); this.receiving_lc.connect(myConnections); In the button movie I have the following code in the main timeline: var sending_lc:LocalConnection = new LocalConnection(); sending_lc.connect(myConnections); play_button.onRelease = function() { sending_lc.send(myConnections, setMedia, inmylife.mp3, MP3); } For the test HTML, I have following code (created by merging the two html's created by publishing: html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleplayer/title /head body bgcolor=#ff !--url's used in the movie-- !--text used in the movie-- !-- saved from url=(0013)about:internet -- object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0; width=700 height=200 id=player align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=player.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=player.swf quality=high bgcolor=#ff width=700 height=200 name=player align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0; width=30 height=32 id=play align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=play.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=play.swf quality=high bgcolor=#ff width=30 height=32 name=play align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object /body /html Could it be I have to allow connections from this domain? (I saw another recent topic on that here). Marty ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
If both swf's are on the same domain, you don't need to do anything special to get things working. Have you tried simplifying things, like sending a simple text message from one swf to the other? // sender swf import mx.utils.Delegate; function sendMessage() { trace(Sender ::: sendMessage); var sending_lc:LocalConnection = new LocalConnection(); sending_lc.send(_myConnections, setMedia, Hello World); } play_button.onRelease = Delegate.create(this, this.sendMessage) // reciever swf import mx.utils.Delegate; function setMedia(msg:String) { trace(Receiver ::: setMedia); trace(msg); // make sure there's a textfield on stage called message_txt this.message_txt.text += msg+\n; } var receiving_lc:LocalConnection = new LocalConnection(); receiving_lc.setMedia = Delegate.create(this, this.setMedia); receiving_lc.connect(_myConnections); Start by running both swf's in the IDE, so you can see the trace output. Once you got that working, try in a browser and see if the output is displayed in the textfield. view example http://muzakdeezign.com/downloads/localconn/ download example http://muzakdeezign.com/downloads/localconn/localconn.zip regards, Muzak - Original Message - From: Martin Scott Goldberg [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Saturday, October 28, 2006 5:57 AM Subject: Re: [Flashcoders] LocalConnection and Media Components? Hi Ray, that didn't work either. Changed the code to reflect those help pages as well, and that didn't work either. Here's the sending code: play_button.onRelease = function() { var sending_lc:LocalConnection = new LocalConnection(); sending_lc.send(_myConnections, setMedia, inmylife.mp3, MP3); } Here's the recieving code: _root.my_display.associateController(my_controller); _root.my_controller.controllerPolicy = on; var receiving_lc:LocalConnection = new LocalConnection(); function setMedia(file:String, type:String){ _root.my_display.setMedia(file, type); } receiving_lc.allowDomain = function():Boolean { return true; } receiving_lc.connect(_myConnections); This is getting really dissheartening that there's this much of a problem to do what should be a simple function. Marty ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
Martin, Sorry I'm just getting back to you, was out of town for a wedding. You have things a bit in a weird order in the receiving swf. Also, receiving_lc outside and inside the initialize function are 2 differenct variables/instances. receiving_lc in the initialize function is local to the function, because of the var keyword. And nested functions are a 'no no'.. If you're coding in the main timeline, try this: Yes, I'm coding in the main timeline. I have the following code now (after modding yours) and I still can't get it to work: import mx.utils.Delegate; my_display.associateController(my_controller); my_controller.controllerPolicy = on; function setMedia(file:String, type:String){ this.my_display.setMedia(file, type); } var receiving_lc:LocalConnection = new LocalConnection(); this.receiving_lc.setMedia = Delegate.create(this, this.setMedia); this.receiving_lc.connect(myConnections); In the button movie I have the following code in the main timeline: var sending_lc:LocalConnection = new LocalConnection(); sending_lc.connect(myConnections); play_button.onRelease = function() { sending_lc.send(myConnections, setMedia, inmylife.mp3, MP3); } For the test HTML, I have following code (created by merging the two html's created by publishing: html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en head meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / titleplayer/title /head body bgcolor=#ff !--url's used in the movie-- !--text used in the movie-- !-- saved from url=(0013)about:internet -- object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0; width=700 height=200 id=player align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=player.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=player.swf quality=high bgcolor=#ff width=700 height=200 name=player align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object object classid=clsid:d27cdb6e-ae6d-11cf-96b8-44455354 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0; width=30 height=32 id=play align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=play.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=play.swf quality=high bgcolor=#ff width=30 height=32 name=play align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object /body /html Could it be I have to allow connections from this domain? (I saw another recent topic on that here). Marty ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
I'm pretty new at this, so I'm not sure how much help I can really be, but I'll give it a shot. One thing I just noticed is that in your code for the button movie you instantiate the LocalConnection but don't call connect(). If what you gave there is all of your code than that's probably the problem. You seem to be including the name of the connection when you call 'send'. I don't think this is right (at least from the way I'm used to using it). Instead, you'd do something like this: var sending_lc:LocalConnection = new LocalConnection(); sending_lc.connect(myConnections); play_button.onRelease = function() { sending_lc.send(methodToExecute, C:/inmylife.mp3, MP3); } Try that and see if it helps. -Andy On 10/18/06, Martin Scott Goldberg [EMAIL PROTECTED] wrote: Hi Andy, I started with a working player, meaning I had a working flash movie that played the local mp3 in the web browser window. So the locality shouldn't be an issue. I then tried extending it with the LocalConnection material. I've been trying to do some things to check out what's being called and what isn't, and it looks like my processing function in the player never gets called. Is it a possibility of an html problem? I'm publishing the player movie, publishing the button movie, and then clipping and pasting the object definition from the button movie html in to the player movie html. The other issue is I don't know if the MediaDisplay component can have its associated file changed midstream? Marty ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
argh, error in the last piece of code In the sending swf: var sending_lc:LocalConnection = new LocalConnection(); sending_lc.send(myConnections, setMP3, inmylife.mp3, MP3); regards, Muzak ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
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 ___ Flashcoders@chattyfig.figleaf.com 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 ___ Flashcoders@chattyfig.figleaf.com 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
Re: [Flashcoders] LocalConnection and Media Components?
Hi Andy, I started with a working player, meaning I had a working flash movie that played the local mp3 in the web browser window. So the locality shouldn't be an issue. I then tried extending it with the LocalConnection material. I've been trying to do some things to check out what's being called and what isn't, and it looks like my processing function in the player never gets called. Is it a possibility of an html problem? I'm publishing the player movie, publishing the button movie, and then clipping and pasting the object definition from the button movie html in to the player movie html. The other issue is I don't know if the MediaDisplay component can have its associated file changed midstream? Marty ___ Flashcoders@chattyfig.figleaf.com 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
[Flashcoders] LocalConnection and Media Components?
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 ___ Flashcoders@chattyfig.figleaf.com 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