I understand what you are saying and agree but it shocked me to read the
part about Delegates and your example through service, pendingcall, and
relayresponder at him. The use of those 3 together seemed way more advanced
for him to learn than a Delegate.

All is well though. I guess it is preference. So you know, if you use custom
classes I strongly suggest you not import those classes into every class you
need remoting functionality. It will add tons of unneccessary bloat, hence
the creation of the Singleton I posted.

To each his own...hope he gets it going either way.

On 2/23/06, Kevin Aebig <[EMAIL PROTECTED]> wrote:
>
> Delegates might be simple to those of us comfortable with ActionScript,
> but
> I always try and keep it extremely cut and dry so that the example doesn't
> try to show more that what it should.
>
> Anyhow, I think both were pretty well the same, so no big deal. On a side
> note, I actually always err on the side of caution when I do examples for
> people. If he decides to add more advanced or in-depth features, than he
> won't hit the wall of "Why won't this work?" when all it would take is an
> import... plus because those classes are pretty lightweight, no harm no
> foul.
>
> Cheers,
>
> Kevin
>
> -----Original Message-----
> From: John C. Bland II [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 23, 2006 5:58 PM
> To: CF-Talk
> Subject: Re: Getting data into Flash 8
>
> Do you mean my example above is too complex? Delegates are super simple.
>
> Delegate.create(scope, functionname)
>
> You might not want to import the entire remoting and rpc package since
> you're not using all of it. That is extra bloat that isn't needed.
>
> On 2/23/06, Kevin Aebig <[EMAIL PROTECTED]> wrote:
> >
> > It's using certain development idea's that complicate things for
> beginners
> > like using Delegates to handle listeners.
> >
> > Here's a bare-bones example... comments included. Let me know if any of
> > this
> > is confusing.
> >
> > Cheers,
> >
> > !k
> >
> >
> > /* --------- CODE-START ----------- */
> > import mx.remoting.*;
> > import mx.rpc.*;
> > import mx.remoting.debug.NetDebug;
> >
> > // This is gatewayurl. Replace the 'my.serverdomain.com' with the domain
> > of
> > // the server that is running your CFC
> > var gatewayUrl:String = "
> http://my.serverdomain.com/flashservices/gateway
> > ";
> >
> > // This is the actual folder path to the service, only it's separated by
> > // dots instead of slashes.
> > // So this one, using the domain from above as an example would be
> > // 'http://my.serverdomain.com/test/services/testService.cfc'
> > var pathToComponent:String = "test.services.testService";
> >
> > // Initialize the gateway as well as the service
> > NetDebug.initialize();
> > var service:Service = new Service(gatewayUrl, null, pathToComponent);
> >
> > function onClick()
> > {
> >         var pc:PendingCall = service.testCall();
> >         pc.responder = new RelayResponder(this, "handleCallSuccess",
> > "handleCallError");
> > }
> > function handleCallSuccess (result:ResultEvent)
> > {
> >         // Deal with the data as you see fit. If you're unsure what kind
> > of
> > // data you're getting back, take a
> >         // look at the NetConnection Debugger. It can show you what the
> > data
> > // looks like as well as the result and the calls
> >         // being made.
> > }
> > function handleCallError(fe:FaultEvent)
> > {
> >         // Look at the FaultEvent Object if you want to show any
> warnings
> > or
> > // log the error.
> >         // Flash's docs show some good examples how to easily get to and
> > use
> > // this object.
> > }
> > /* --------- CODE-END ----------- */
> >
> >
> >
> >
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233327
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to