13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

HTTP communications<br />

}<br />

{<br />

result += xmlToString( rootNode.firstElem<strong>en</strong>tChild, ind<strong>en</strong>t + " " );<br />

}<br />

if( rootNode.nextElem<strong>en</strong>tSibling )<br />

{<br />

result += ind<strong>en</strong>t + "\n";<br />

result += xmlToString( rootNode.nextElem<strong>en</strong>tSibling, ind<strong>en</strong>t );<br />

}<br />

else<br />

{<br />

result += ind<strong>en</strong>t +"\n";<br />

}<br />

return result;<br />

<br />

<br />

<br />

Request:<br />

<br />

Result:<br />

<br />

<br />

<br />

SOAP web service requests<br />

Flash Player 9 and later, Adobe AIR 1.0 and later<br />

SOAP builds on the g<strong>en</strong>eral XML-RPC web service concept and provides a richer, albeit more complex, means for<br />

transferring typed data. SOAP web services typically provide a Web Service Description Language file (WSDL) that<br />

specifies the web service calls, data types, and service URL. While ActionScript 3 does not provide direct support for<br />

SOAP, you can construct a SOAP XML message “by hand,” post it to the server, and th<strong>en</strong> parse the results. However,<br />

for anything except the simplest SOAP web service, you can probably save a significant amount of developm<strong>en</strong>t time<br />

using an existing SOAP library.<br />

The Flex framework includes libraries for accessing SOAP web services. In Flash Builder the library, rpc.swc, is<br />

automatically included in Flex projects, since it is part of the Flex framework. In Flash Professional, you can add the<br />

Flex framework.swc and rpc.swc to the library path of a project and th<strong>en</strong> access the Flex classes with ActionScript.<br />

More Help topics<br />

Using the Flex web service compon<strong>en</strong>t in Flash Professional<br />

Cristophe Co<strong>en</strong>raets: Real-time Trader Desktop for Android<br />

Op<strong>en</strong>ing a URL in another application<br />

Flash Player 9 and later, Adobe AIR 1.0 and later<br />

You can use the navigateToURL() function to op<strong>en</strong> a URL in a web browser or other application. For cont<strong>en</strong>t running<br />

in AIR, the navigateToURL() function op<strong>en</strong>s the page in the default system web browser.<br />

Last updated 6/6/2012<br />

826

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!