listening for electroserver events in nested swf
I use electroserver to create game, log in, etc in a root level movie. I can create/update/and get the events for room variables at this level.
I then load a swf which needs to be able to: update room variables, listen for room variable updates, and set new local variables based on the updated room variables.
Anyone done this? It seems that I should be able to do this directly without creating new events and listeners, but not sure on the best approach.
You could always have the loaded swf call wrapper functions in the main swf. Another way is to have the main swf pass your ElectroServer connection object to the loaded swf and handle events this way.
I suggest the first method as it allows your main swf to be developed mainly as a communicator and doesn't require you to recode the swf you're loading every time you change how you interact with ElectroServer.
Tags for this Thread