|
Sending messages from Flash to a scripting language
To send messages to a scripting language from an action within a Flash movie, use the FSCommand action in a GetURL button or frame action. The text you enter in the URL field is called the command string and the text you enter in the Target field is called the argument string. When you assign the FSCommand action these strings are passed to the script in the HTML document and can be used for any purpose you need. To respond to FSCommand messages in a script, you should match the function name with the NAME/ID property set in the OBJECT and EMBED tags of the Flash Player movie that is sending the FSCommand messages.
Note: The FSCommand syntax doesn't allow you to execute function calls like JavaScript. FSCommand can pass only two strings to the NAME/ID_DoFSCommand(command, args) function. To execute a function call, evaluate the string contained in the command variable and execute the function call if it contains the desired value. This technique must be used when FSCommand passes more than one possible string since only one function responds to the FSCommand event.
Here is an example: |