If it may help, this is how I usually manage my remote connections.
Before you say it's off-topic, I think it might answer your question :


public class LCRemoteConnectionManager
{
                
private static var serverRemoteObject : RemoteObject ; // = null
                
                
private var onGetCelluleFormatListResultFunction : Function ;
private var onGetCelluleFormatListResultFaultFunction : Function ;


/*
.... some irrelevant stuff
*/

public function getCellulesFormats (AGetFormatListResultFunction : Function 
,AGetFormatListResultFaultFunction : Function ) : void
{
        if (serverRemoteObject === null)
        { this.createServerRemoteObject() ; }
        
        this.onGetCelluleFormatListResultFaultFunction = 
AGetFormatListResultFaultFunction ;
        this.onGetCelluleFormatListResultFunction = 
AGetFormatListResultFunction ; 
        
        serverRemoteObject.getCellulesFormats();
}

private function getCellulesFormatsResult (AEvent : ResultEvent):void
{
        if (this.onGetCelluleFormatListResultFunction != null)
        { this.onGetCelluleFormatListResultFunction(AEvent) ; }
        else
        { Alert.show("LCRemoteConnectionManager : getCellulesFormatsResult : 
onGetFormatListResultFunction is null") ; }
}


So I assign myFunction variables like any others (myFunction = someFunction )
and then, I call it like any other. The only problem is that I need to know how 
to use someFunction when calling myFunction.

good luck
 
--- In flexcoders@yahoogroups.com, Nick Middleweek <n...@...> wrote:
>
> Hello,
> 
> I can't find any examples on how to create Functon variables?
> 
> Does anyone have any to hand please?
> 
> 
> Thanks,
> Nick
> 
> 
> -- 
> Sent by Nick Middleweek ( { email: n...@..., blog:
> http://blog.middleweek.co.uk } );
>


Reply via email to