MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1505

Components language reference
Table of Contents

Advertisement

Example
This example displays an error because the required parameters are not being passed. Drag an
XMLConnector component into your library, and 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) {
switch (evt.code) {
case 'Fault' :
trace("ERROR! ["+evt.data.faultcode+"]");
trace("\t"+evt.data.faultstring);
break;
case 'InvalidParams' :
trace("ERROR! ["+evt.code+"]");
break;
}
};
var myXMLConnector:XMLConnector = new XMLConnector();
myXMLConnector.addEventListener("result", xmlListener);
myXMLConnector.addEventListener("status", xmlListener);
myXMLConnector.direction = "send/receive";
myXMLConnector.URL = "http://www.flash-mx.com/mm/login_xml.cfm";
myXMLConnector.multipleSimultaneousAllowed = false;
myXMLConnector.suppressInvalidCalls = false;
// myXMLConnector.params = new XML("<login username='Mort'
password='Guacamole' />");
myXMLConnector.trigger();
Remove the comments from the second to last line of code for the snippet to work correctly.
XMLConnector.suppressInvalidCalls
1501

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents