RemoteObjectAMF0 Update

March 12th, 2007

The RemoteObjectAMF0 under went a few updates.

  • Updated code with better comments for ASDoc's and readability
  • Added SetCredentials
  • Added Fault handler for NetStatus errors
  • Added 1st round implementation for "method" definitions.
    • Allowing you to define result/fault event handlers per method.
    • This is done with a <renaun:methods/> tag and a <renaun:method/> component.

Example of using the <renaun:methods/> tag:

XML:
  1. <renaun:RemoteObjectAMF0
  2.         id="contactsService"
  3.         source="ContactsService"
  4.         endpoint="http://localhost/amfphp1_9/gateway.php"
  5.         fault="Alert.show( event.message.toString() )">
  6.         <renaun:methods>
  7.             <renaun:method
  8.                 name="GetContacts"
  9.                 result="changeContactList( event )"
  10.                 makeObjectsBindable="true" />
  11.                        
  12.             <renaun:method
  13.                 name="MaintainContact"
  14.                 result="Alert.show( event.result.toString() )"
  15.                 makeObjectsBindable="true" />   
  16.                
  17.         </renaun:methods>               
  18.     </renaun:RemoteObjectAMF0>

You can find the full source to this example in the 360Flex presentation source located at:
http://renaun.com/360Flex/

The updated RemoteObjectAMF0 code can be found at - http://renaun.com/flex2/RemoteObjectAMF0/renaun_com_RemoteObjectAMF0.zip

NOTE: The zip download now includes a swc compiled for Flex 3 which was giving a warning about a override method error.

Entry Filed under: Adobe Flex, Flex,AMF,PHP, Rich Internet Applications

2 Comments Add your own

  • 1. Z3Labs.com » Blog A&hellip  |  2007-03-12 at 9.04 pm

    [...] В продолжении недавнего поста про Flex + php: http://renaun.com/blog/2007/03/12/197/ Renaun Erickson сделал Flex 2 Компонент RemoteObjectAMF0 [...]

  • 2. Derek  |  2008-06-16 at 8.01 am

    I have noticed an error when you attempt to compile this in Flex 3. The override public function set credentials on line 389 needs to be changed to “override public function setCredentials (username:String,password:String,charset:String = null):void”. I found the fix in the following url:
    http://code.google.com/p/as3-rpclib/wiki/Resources

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Disclaimer: I work as a Flash/Flex Developer for Adobe Systems Incorporated. The opinions expressed here represent my own and not those of my employer.

My Amazon.com Wish List

Calendar

March 2007
S M T W T F S
« Feb   Apr »
 123
45678910
11121314151617
18192021222324
25262728293031

Most Recent Posts


Flex.org - The Directory for Flex