Re: [flexcoders] Learning Flex and AMFPHP

2008-09-25 Thread Aaron Miller
It is hard to find. Here is a snippet from my code. Hope it helps!
public function loadFavorites( resultHandler:Function,
errorHandler:Function, zone:String ): void {
trace('FavoritesProxy.loadFavorites');
var dataService:RemoteObject = new RemoteObject();
var channel:Channel = new AMFChannel( 'amfphp',
GlobalSettings.AMFPHP_GATEWAY );
var channelSet:ChannelSet = new ChannelSet();
 channelSet.addChannel(channel);
 dataService.channelSet = channelSet;
dataService.destination = amfphp;
dataService.source = FavoritesProxy;
dataService.loadFavorites.addEventListener( ResultEvent.RESULT,
resultHandler );
dataService.addEventListener(FaultEvent.FAULT, errorHandler);
dataService.loadFavorites( myUser.userID, myUser.userHash, zone );
}

This calls FavoritesProxy-loadFavorites in the amfphp services.

Best Regards,
~Aaron

On Wed, Sep 24, 2008 at 9:52 PM, timgerr [EMAIL PROTECTED] wrote:

   Hello all, hope you all are doing good. I have a question on how to
 build the Flex RemoteObject method in action script. I am having
 troubles doing this. Here is my RemoteObject:

 mx:RemoteObject id=myservice fault=faultHandler(event)
 showBusyCursor=true source=tutorials.HelloWorld destination=amfphp
 mx:method name=sayHello result=resultHandler(event) /
 /mx:RemoteObject

 Can someone take the above code and do it in acitonscript? It is not
 that I want someone to do my work, I am having a hard time finding
 data to do this. Most examples are in Flash and for some reason they
 do not work right in Flex.

 Thanks for all the help,
 timgerr

  




-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com


Re: [flexcoders] Learning Flex and AMFPHP

2008-09-25 Thread Alan
I ironically, I have found WebOrb's site http://www.themidnightcoders.com/weborb/php/ 
 to be very helpful for any Flex remoting info - regardless if your  
using amfphp or not.  In their tutorials, they have an example of a  
remote object , constructed in action script, connecting to a php  
service.



Alan
On Sep 25, 2008, at 12:52 AM, timgerr wrote:


Hello all, hope you all are doing good. I have a question on how to
build the Flex RemoteObject method in action script. I am having
troubles doing this. Here is my RemoteObject:




Re: [flexcoders] Learning Flex and AMFPHP

2008-09-25 Thread Terry Allen
I was also having trouble with AMFPHP until I purchased the Essential Guide
to Open Source Flash.
The creator of AMFPHP has a chapter (chapter 7) that fully explains how to
setup the PHP and Flex side of a CRUD sample application. It also contains a
primer on VO's.
I highly recommend this chapter to anyone starting out with AMFPHP or Flex
RemoteObject. (I have not read any of the other chapters just yet :)  )

Terry






On Thu, Sep 25, 2008 at 2:14 AM, Aaron Miller 
[EMAIL PROTECTED] wrote:

It is hard to find. Here is a snippet from my code. Hope it helps!
  public function loadFavorites( resultHandler:Function,
 errorHandler:Function, zone:String ): void {
 trace('FavoritesProxy.loadFavorites');
 var dataService:RemoteObject = new RemoteObject();
 var channel:Channel = new AMFChannel( 'amfphp',
 GlobalSettings.AMFPHP_GATEWAY );
 var channelSet:ChannelSet = new ChannelSet();
  channelSet.addChannel(channel);
  dataService.channelSet = channelSet;
 dataService.destination = amfphp;
 dataService.source = FavoritesProxy;
 dataService.loadFavorites.addEventListener( ResultEvent.RESULT,
 resultHandler );
 dataService.addEventListener(FaultEvent.FAULT, errorHandler);
 dataService.loadFavorites( myUser.userID, myUser.userHash, zone );
 }

 This calls FavoritesProxy-loadFavorites in the amfphp services.

 Best Regards,
 ~Aaron

 On Wed, Sep 24, 2008 at 9:52 PM, timgerr [EMAIL PROTECTED] wrote:

   Hello all, hope you all are doing good. I have a question on how to
 build the Flex RemoteObject method in action script. I am having
 troubles doing this. Here is my RemoteObject:

 mx:RemoteObject id=myservice fault=faultHandler(event)
 showBusyCursor=true source=tutorials.HelloWorld destination=amfphp
 mx:method name=sayHello result=resultHandler(event) /
 /mx:RemoteObject

 Can someone take the above code and do it in acitonscript? It is not
 that I want someone to do my work, I am having a hard time finding
 data to do this. Most examples are in Flash and for some reason they
 do not work right in Flex.

 Thanks for all the help,
 timgerr




 --
 Aaron Miller
 Chief Technology Officer
 Open Base Interactive, LLC.
 [EMAIL PROTECTED]
 http://www.openbaseinteractive.com