There are alot of ways to connect to a remote service in Flex / Flash.
You can do it tag based:
Actionscript:
-
<mx:Application
-
xmlns:mx="http://www.adobe.com/2006/mxml"
-
layout="absolute">
-
-
<mx:RemoteObject id="blazeService" fault="onFault(event)" source="hello.Hello" endpoint="http://localhost:8400/hello/messagebroker/amf/" destination="Hello">
-
<mx:method name="sayHello" result="onResult(event)" />
-
</mx:RemoteObject>
-
-
<mx:Script>
-
-
<![CDATA[
-
import mx.messaging.channels.AMFChannel;
-
import mx.rpc.events.ResultEvent;
-
import mx.rpc.events.FaultEvent;
-
-
private function onResult(e:ResultEvent):void {
-
trace("Result" + e.result);
-
}
-
-
private function onFault(e:FaultEvent):void {
-
trace("fault");
-
}
-
]]>
-
</mx:Script>
-
-
</mx:Application>
or actionsript based:
Read the rest of this entry...


