Usage
componentInstance.multipleSimultaneousAllowed
Description
Property; indicates whether multiple calls can take place at the same time. If this property is
, the
false
XMLConnector.trigger()
progress. A
status
, the call takes place.
true
When multiple calls are simultaneously in progress, there is no guarantee that they will complete
in the order in which they were triggered. Also, the browser and/or operating system may place
limits on the number of simultaneous network operations. The most likely limit you may
encounter is the browser enforcing a maximum number of URLs that can be downloaded
simultaneously. This is something that is often configurable in a browser. However, even in this
case, the browser should queue streams, and this should not interfere with the expected behavior
of the Flash application.
Example
This example retrieves a remote XML file using the XMLConnector component by setting the
property to
direction
enter the 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();
This example specifies the URL of the XML file, and sets
. It triggers the XMLConnector instance three times, which causes the event listener's
false
method to display the error code
status
panel. The first attempt is successfully sent from Flash to the server. When the first trigger
successfully receives a result, the
displayed in the Output panel.
898
Chapter 6: Components Dictionary
method performs a call if another call is already in
event is emitted, with the code
. Drag an XMLConnector component into your library, and
receive
CallAlreadyInProgress
event is broadcast and the XML packet you receive is
result
CallAlreadyInProgress
multipleSimultaneousAllowed
two times in the Output
. If this property is
to
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?