MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 869

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

Advertisement

Example
This example returns data from a remote web service and traces a tip and how long the service
takes to return the data to the SWF file. Drag a WebServiceConnector component into your
library, and enter the following code on Frame 1 of the Timeline:
import mx.data.components.WebServiceConnector;
var startTime:Number;
var wscListener:Object = new Object();
wscListener.result = function(evt:Object) {
var resultTimeMS:Number = getTimer()-startTime;
trace("result loaded in "+resultTimeMS+" ms.");
trace(evt.target.results);
};
wscListener.send = function(evt:Object) {
startTime = getTimer();
};
var wsConn:WebServiceConnector = new WebServiceConnector();
wsConn.addEventListener("result", wscListener);
wsConn.addEventListener("send", wscListener);
wsConn.WSDLURL = "http://www.flash-mx.com/mm/tips/tips.cfc?wsdl";
wsConn.operation = "getTipByProduct";
wsConn.params = ["Flash"];
wsConn.suppressInvalidCalls = true;
wsConn.multipleSimultaneousAllowed = false;
wsConn.trigger();
WebServiceConnector.params
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
componentInstance.params
Description
Property; specifies data that will be sent to the server when the next
executed. The data type is determined by the WSDL description of the web service.
When you call web service methods, the data type of the
ActionScript object or array as follows:
If the web service is in document format, the data type of
If you use the Property inspector or Component inspector to set the WSDL URL and
operation while authoring, you can provide
as required by the web service method, such as
as an array of parameters in the same order
params
[1, "hello", 2432]
WebServiceConnector component (Flash Professional only)
trigger()
property must be an
params
is an XML document.
params
.
operation is
869

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?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents