Interoperability between two Flash EXE Projectors (or how to dynamically read SharedObjects across two SWFs)
So here’s a real doozie that came from a question someone asked on ExpertsExchange: he had two separate Flash Projectors (EXEs) - that needed to be able to intercommunicate (the first projector needed to know when the second projector had actually finished loading). Since we’re dealing with external projector files that have no dependencies (rather than using the movieClipLoader to load an external SWF into the parent movie), the only thing I could think of that would work reliably was local SharedObjects.
As I put together a solution for this brave soul, I encountered a few interesting challenges, and a few frustrations. Thought I’d document it here because I couldn’t find anyone else who had addresses the intricacies of having two SWF share a SharedObject and monitor the status of that shared SharedObject so they could respond to a change in status.
Here’s the basic principle:
- Application 1 creates a local SharedObject and sets an initial status
- Application 1 also registers an enterFrame event listener that listens for a status change on the SO
- Application 2 accesses the same SO and at some point, changes the status
- Application 1’s enterFrame handler detects the status change, and responds to the event.
As I write this, I see there’s an opportunity for a custom event class that does all this, but I’m going to leave that to the real gurus. I don’t pretend to have that intimate a knowledge of ActionScript to be able to pull that off. I should also point out at this time that the original EE user’s question was for AS2, so this solution is only tested in AS2, though since the issues I was running into were related to variable scope, I would only imaging that an AS3 implementation would be easier, if anything.
Here are the challenges I encountered:
- how to launch one EXE Projector from another EXE Projector
- how to share a SharedObject between two Flash movies (SWFs)
- how to continuously monitor the value of a shared SharedObject
Pairing a Bluetooth Headset (Motorola H350)
I had to hunt around for this piece of information, so I’m posting it here for posterity. I have a Motorola V361 cellphone and the accompanying Motorola H350 Bluetooth Headset. But no manuals. Never having used any Bluetooth device in my life, let alone this Borg-like implant, I just couldn’t get anything to work.
Here are some lessons learned:
- Make sure you enable Bluetooth in your cellphone first. It defaults to off. The Motorola V361 Manual proved quite helpful in this regard. Main Menu > Bluetooth Link > Setup > Power > On.
- Next you must set your headset in Bluetooth Pairing Mode. For the Motorola H350 / H500, you make sure it’s turned off, and then press and hold the “Phone” button on the front of the device. Hold the button down (for about 10 seconds) until the blue light around the Motorola icon (also on the front of the device) remains lit, solid blue (not flashing). Now you are in “pairing” mode, which enables this to “bond” with other devices.
- Now, on the cellphone, go to the Bluetooth configuration screen. Main Menu > Bluetooth Link > Handsfree > Detect. This will take about 3 seconds and it will detect your earpiece. Interestingly, it detected it as an H500. Hey who knows, maybe I have an H500 instead. At any rate, now the whole kit and kaboodle works fine.
So there you have it. Setting up your Motorola Bluetooth Headset for the first time.