RemoteObjectAMF0 Update

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:
<renaun:RemoteObjectAMF0
        id="contactsService"
        source="ContactsService"
        endpoint="http://localhost/amfphp1_9/gateway.php"
        fault="Alert.show( event.message.toString() )">

        <renaun:methods>
            <renaun:method
                name="GetContacts"
                result="changeContactList( event )"
                makeObjectsBindable="true" />

                       
            <renaun:method
                name="MaintainContact"
                result="Alert.show( event.result.toString() )"
                makeObjectsBindable="true" />
   
               
        </renaun:methods>               
    </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.

  • http://z3labs.com/2007/03/13/phpamf-flex-2-component/ Z3Labs.com » Blog Archive » phpamf flex 2 component

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

  • Derek

    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