Skip to main content
nyarsulik
Participant
October 16, 2015
Question

Using a URLRequest (across two separate IP addresses) in place of a LocalConnection so two Flash apps can talk

  • October 16, 2015
  • 1 reply
  • 250 views

Hello!

I typically use LocalConnection for all of my device prototypes and it works great for my needs.  Yay LocalConnection!  However, in my latest project I have two devices that won't be running on the same machine (but will be connected locally) so that doesn't seem to be possible to do with LocalConnection?  I will have my main application running on a PC, and then the other app is actually running on a Cubieboard, connected through ethernet.  So, I have a series of questions on how best to get this to work...  My connection to the Cubieboard will be from a router with a static IP to an ethernet connection on the Cubieboard.  I have established/proven that I can use a node.js script to transfer a key event to the Cubieboard (and trigger said event on the Cubieboard Flash App) but what I really need to do is be able to send a variable or a function call so that I can directly tell the Cubieboard Flash app to change to item "x" or to alter a string to "x", etc.  Right now I have to rely on listening for the keycodes within the Cubieboard app but that leaves a lot to be desired, and runs the risk of items becoming out of sync between the two apps.

Am I looking at all of this the wrong way?  Is there a better way to do this?

Here is a rough attempt at the setup:

PC Flash App --> Create URL Request in PC Flash App --> Send URLRequest to Node.js Server (running on PC) --> Server sends key event to IP address of CubieBoard

If I am sending anything more than a key event within the URLRequest Variables from the node.js server, how would I "listen" for that command within the Flash app on the CubieBoard?

Thank you for any possible help!

Nick

This topic has been closed for replies.

1 reply

nyarsulik
nyarsulikAuthor
Participant
October 16, 2015

Is there a way for me to connect to the second flash app directly (using it's IP address) without going through a separate server?