What's New in Director 8.5 > Working with Flash 5 > sendXML |  |

sendXML

Syntax

    sendXML "sendxmlstring", "window", "postdata"

Description

Command; functions much like the `getURL` scripting method, which is also available in the Flash Asset Xtra component of Director. The `sendXML` handler is called when the `sendXML` ActionScript method is executed in a Flash movie. As a result, the Flash sprite sends its XML data to Lingo. In essence, `sendXML` calls up information in a Flash sprite, which you can then use to further develop the XML capabilities of your Director movie.

You use the `sendXML` command in Director when you apply this behavior to a Flash sprite. If there is a `sendXML` handler in a behavior attached to the Flash sprite, the Flash Asset Xtra calls this handler. The information in the handler consists of the three parameters previously established for the `sendXML` ActionScript method: the receiving URL, the target window, and the XML data to send. The data are then passed to the `sendXML` handler in Lingo.

Flash sprites can also load external XML data or parse internal XML data. The Flash Asset Xtra handles these functions in the same way as a Flash 5 movie in your browser.

Example

This Lingo command gets the `sendXML` method information from the Flash sprite and then transmits the XML data to the URL:

    on sendXML me, theURL, targetWindow, xmlData

    postNetText(theURL, xmlData)

    end