More specifically, look for the ServiceLocator. It's a Singleton that houses 
all the remote services.
Then from anywhere in your app you can do something like this:

var service:Service = ServiceLocator.getInstance().getService("nameOfService");
var pendingCall:PendingCall = service.someMethod();
pendingCall.responder = new RelayResponder(this, "resultHandler", 
"faultHandler");

In an ARP/Cairngorm application you would normally do this from a Command 
class, rather than "anywhere in your app".

http://labs.adobe.com/wiki/index.php/Cairngorm
http://cairngormdocs.org/
visual representation of a cairngorm app
http://cairngormdocs.org/cairngormDiagram/index.html

other mvc frameworks
http://puremvc.org/
http://www.model-glue.com/flex.cfm

Note that allthough most of them talk about "flex", don't let that scare you, 
they're all MVC based and are very similar.

regards,
Muzak


----- Original Message ----- 
From: "Glen Pike" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 11, 2007 9:32 PM
Subject: Re: [Flashcoders] Application Structure - Flash Remoting& 
MovieClipLoader


> Hi,
>
>    I would suggest looking at ARP or another Framework to handle your Service 
> calls through a single interface which you create 
> services for.
>
>    It is well documented with examples and OS so you should be able to get 
> the hang of it quite quickly.
>
>    osflash.org/projects/arp
>
>    HTH
>
>    Glen
>
> Richard Mueller wrote:
>>
>> I'm building an application that is going to use Flash Remoting very 
>> heavily.  I'm wondering how I should structure my Service 
>> connections.  Should I put them in each(several) loaded movies or in the 
>> root timeline where any loaded move can access them. 
>> The latter would cause issues when trying to test each movie individually.  
>> But by putting the Service connections in each movie 
>> would require imports needed for FR at the top..
>>
>> Also, I'm new to using the moviecliploader.  I have a few functioning 
>> properly, however, is it wise to try and create a "smart" 
>> loader?  Meaning use one loader and zip when the zip.swf is loaded and zag 
>> with zag.swf.  Or should I just accept, and get in the 
>> habit of using a zip loader and a zag loader separately, meaning each loader 
>> simply serve a specific function.
>>
>> Richard


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to