Hi Bruce,

I could never figure out how to set up a CF project on a machine that
doesn¹t have CF installed on it using the Flex project set up wizard.
However I have good news, when you create a project select the 1st project
option, basic I believe. Then your remoteObject would look something like
this:

<mx:RemoteObject        id="myService"
endpoint="http://cfserver/flex2gateway/";
destination="ColdFusion"        source="API.Tours">          <mx:method
name="getTour" result="handleStringResult(event)"
fault="Alert.show(event.fault.message)" />    </mx:RemoteObject>

Note the endpoint, this bypasses what would get set up in the config files.
Now if you set your remote object up in AS3 then there was a gotcha that I
haven¹t seen talked about is the fact that you can¹t set your channel

            __pocketcreatorRO = new RemoteObject();
__pocketcreatorRO.destination="ColdFusion";            var
customChannel:ChannelSet = createChannel();                     
__pocketcreatorRO.channelSet = customChannel;
__pocketcreatorRO.source="API.admin";
__pocketcreatorRO.addEventListener("fault", onFault);
__pocketcreatorRO.loginUser.addEventListener("result",
onValidateCredentialsResult);
__pocketcreatorRO.loginUser.addEventListener("fault",
onValidateCredentialsFault);

         private function createChannel():ChannelSet        {            cst
= new ChannelSet();             var customChannel:Channel = new
AMFChannel("my-cfamf", "http://cfserver/flex2gateway/";);
            cst.addChannel(customChannel);             return cst;        }

With both these different connection methods to a CF server I suggest not
hard coding in the server path. I suggest passing in your server path with
FlashVars, that way if you have a dev, QA and production environments then
you don¹t have to change the remoting server path and recompile for each of
your environments.

Both of these methods will allow you to dial into Remoting on remote
servers.

Good luck,

Mike Weiland

-----------------
Mike Weiland
Aspen Tree Media
(877)659-1652 | FAX: (512)828-7105
http://www.AspenTreeMedia.com
http://www.CertificateCreator.com - Create & Print Awards and Certificates



On 1/10/07 5:39 PM, "boy_trike" <[EMAIL PROTECTED]> wrote:

>  
>  
>  
> 
> In our network we have a windows machine with Coldfusion.  I am running
> flexbuilder on my
> mac.  How can I configure a project on the mac to:
> 1).  Access Coldfusion (I get stuck on page 2 where it asks for the CFSERVER
> 2).  Have the BIN folder under wwwroot on the same machine so my code is
> compiled and 
> automatically sent to the server
> 
> thanks
> 
> bruce
> 
>  
>     


Reply via email to