MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 904

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

XMLConnector.trigger()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
componentInstance.trigger()
Description
Method; initiates a remote procedure call. Each RPC component defines exactly what this
involves. If the operation is successful, the results of the operation appear in the RPC
component's
results
The
trigger()
If any data is bound to the
1.
up-to-date data is available. This also causes data validation to occur.
If the data is not valid and
2.
is discontinued.
If the operation continues, the
3.
The actual remote call is initiated using the connection method indicated (for example, HTTP).
4.
Example
This example retrieves a remote XML file using the XMLConnector by setting the
property to
receive
following code on Frame 1 of the Timeline:
import mx.data.components.XMLConnector;
var xmlListener:Object = new Object();
xmlListener.result = function(evt:Object) {
trace("results:");
trace(evt.target.results);
trace("");
};
xmlListener.status = function(evt:Object) {
trace("status::"+evt.code);
};
var myXMLConnector:XMLConnector = new XMLConnector();
myXMLConnector.addEventListener("result", xmlListener);
myXMLConnector.addEventListener("status", xmlListener);
myXMLConnector.direction = "receive";
myXMLConnector.URL = "http://www.flash-mx.com/mm/tips/tips.xml";
myXMLConnector.multipleSimultaneousAllowed = false;
myXMLConnector.suppressInvalidCalls = true;
myXMLConnector.trigger();
myXMLConnector.trigger();
myXMLConnector.trigger();
904
Chapter 6: Components Dictionary
property.
method performs the following steps:
property, the method executes all the bindings to ensure that
params
suppressInvalidCalls
send
. Drag an XMLConnector component into your library, and enter the
is set to
event is emitted.
, the operation
true
direction

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents