Skip to main content
Participating Frequently
February 19, 2012
Question

Share data between 2 local flash applications and use dynamically

  • February 19, 2012
  • 1 reply
  • 2990 views

Hi all, I'm assuming what I want to achieve is possible, but not entirely sure on how to achieve it.

I work in a theatre and I'm looking to create a seat map that can be shown to members of the public as they book their seats, so they can see where they are going to be sitting. The main problem I've come up against is that the person viewing the application, will not be using it. I need the Box Office clerk to be able to input data, and then the seating plan shows the seats on a second monitor (public facing)

What I thought of doing was to create 2 flash applications and used Shared Objects to pass data from one to the other. In the Clerk application, they would input the seats that are being requested and click Submit (or whatever). In the Public application, these seats would then be highlighted. Ideally, another dynamic image would change to show the view from that general area of seating.

This doesn't need to deal with availability in any way, I just need to be able to show people what seats they would be sitting in.

Any help or advice would be greatly appreciated, or even better, an easier way to do it!

Cheers,

David

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
February 19, 2012

if the two apps are running on the same computer, you can use localconnection to communicate between the two apps.

StoneyOCAuthor
Participating Frequently
February 19, 2012

That's great, didn't know about local connection!

I'm now using localconnection to pass text data from one app to the other. What I need to do now is get each 'seat' (a movie clip) to keep looking through each of the 6 text fields and if it see's its own name, change colour. Can I write an If function using the MC's own name as a parameter?

kglad
Community Expert
Community Expert
February 19, 2012

you can't pass objects through localconnect but you can pass strings that are converted to objects.  eg, if you have a movieclip with instance name "seat_32_21" in your customer app and you want your box office app to indicate that seat has been purchased, you can send  the two strings "seat_32_21", "purchased" to your receiving localconnection and it can use those strings to do something to the movieclip with instance name "seat_32_21":

// do whatever with MovieClip(seatParent.getChildByName(parameter1)).  eg,

MovieClip(seatParent.getChildByName(parameter1)).gotoAndStop(parameter2);