Hi,
I have two flash clips in an html file and I need them to communicate.
One is a player window and the other is a menu.
Now, I managed to find a code on the net that works for sending a text variable over a local connection. It looks like this:
And the receiver is like:Code:on(rollOver) { my_lc= new LocalConnection(); my_lc.send("_myLocalConnection","recievedValue","Home") }
How do I have to modify this AS so it would be able to receive an exact command? For example, a button in the menu would send a GotoFrame(3) so the player would jump onto it's corresponding frame. Another button would send a GotoFrame(4), etc.Code:myReceiving_lc = new LocalConnection() myReceiving_lc.connect("_myLocalConnection") myReceiving_lc.recievedValue = function(menuName) { myText=menuName trace(menuName) }
I've been thinking that I'd use the code like this:
But then how do I receive and excute that command in the player?Code:on(release) { my_lc= new LocalConnection(); my_lc.send("_myLocalConnection","recievedValue","GotoFrame(3)") }
I've started with
I'm not exactly sure how to finish this receiving code or if I should re-state it. Any ideas?Code:myReceiving_lc = new LocalConnection() myReceiving_lc.connect("_myLocalConnection") myReceiving_lc.recievedValue = function(-received comand-) { - function execution - }
Thanks in advance


Reply With Quote

Bookmarks