tags:

views:

219

answers:

2

All,

I'm looking for some information on connecting a Flash (not Flex) application to Blaze DS.

(A Google search is surprisingly unhelpful...)

Adobe's mini-site about BlazeDS (http://opensource.adobe.com/wiki/display/blazeds/Overview) mentions:

Blockquote Welcome to BlazeDS! BlazeDS is the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time to Adobe® Flex™ and Adobe AIR™ applications for more responsive rich Internet application (RIA) experiences.

... which notably omits "Flash".

Any insights or pointers would be greatly appreciated.

Cheers, Matt

A: 

In case anyone is interested, this seems to work...

import mx.remoting.Service;
import mx.rpc.RelayResponder;
import mx.rpc.FaultEvent;
import mx.rpc.ResultEvent;
import mx.remoting.PendingCall;

myService = new Service([service url], null, [remote bean name]);
var pc::PendingCall = myService.[method]();
pc.responder = new RelayResponder(this, "onServiceData", "onServiceFault");

function onServiceData(msg:ResultEvent) {
    trace ("Service result: " + msg.result);
}
function onServiceFault(rs:FaultEvent) {
    trace ("Service faultstring: " + fault.fault.faultstring);
}

Of course, better solutions would be greatly appreciated!

Cheers, Matt Stuehler

mattstuehler
+1  A: 

Please read Mete post (Livecycle Engineer) how to do that (using the remote service from Flash) http://meteatamel.wordpress.com/2010/01/22/netconnection-and-remoting-in-blazedslcds/

Cornel Creanga