The Flash code in this recipe is quite simple.
We build a single Flash button. When it is pressed Flash will send a command out (a single letter) through something called an XML socket. The command will flow through the XML socket into the XML broker and from there to the Wiring board.
As you can see in the Wiring code (see Export), Wiring waits for this command to come, and when it does commands the servo motor to move.
An XML socket is a channel of communicating that Macromedia Flashâ„¢ has as a built-in function. This socket communicates using a format called XML.
Flash and ActionScript concepts in this recipe:
Connecting Flash to Wiring
The basics of Flash-to-Wiring communication
Sending a simple command from Flash to the XML broker
Working with the Flash source file four this recipe:
Download the Flash source code (.fla) for this recipe: stubbornfinger.zip
Uncompress (”unzip”) the .fla file
Run the Broker
For more detailed instructions, see the ” Broker bridge”
Open the .fla file in Flash (version MX or higher)
Publish the code (Menu > Command)
After the message “Connection established” you can start interacting with your InstantSOUP object
If you don’t see the “Connection established” message , see the Troubleshooting section of the “Publish Flash Code bridge”