Friday, March 26, 2010

How to call a servlet from Flash?...

Hi all,

?I am new to Flash %26amp; ActionScripting.

Can anyone explain me how to call (or) pass access to a Java servlet using Flash [i.e., ActionScript 3.0 code]?

Atleast a hint or example is appreciated.

Waiting for your replies...

It is very urgent.....

?Thanks in advance...

Srihari.Ch

How to call a servlet from Flash?...

Hi all,

Actually, Flash is not calling Java servlet and the equivalent code I am using to call a servlet from Flash is as shown below:

?var xmlurl:String = ''http://localhost/webapps/ROOT/servlet/xmlServlet'';
?var xmlrequest:URLRequest = new URLRequest(xmlurl);

?xmlLoader.dataFormat = URLLoaderDataFormat.TEXT;
?xmlLoader.addEventListener(Event.COMPLETE, xmlcompleteHandler);

?var variables:URLVariables = new URLVariables();
?variables.viewid =String(comboBox_mc.selectedItem.data);
?xmlrequest.data = variables;
?xmlLoader.load(xmlrequest);
?function xmlcompleteHandler(event:Event):void {

//Event handler code for Loading COMPLETE...

?...bla?...bla

?}

No comments:

Post a Comment