Flex2 custom RemoteObjectAMF0 (updated for release)

Posted on June 30, 2006 | 6 comments

[lang_en]
Since the release of Flex2 I have gone back and updated my code examples.

http://renaun.com/flex2/

In particular is the Flex 2 custom RemoteObjectAMF0 class to allow an easy way to connect Flex2 to AMF0 gateways.

You can find the example and source code here.
[/lang_en]
[lang_zh]
因为Flex2出台了, 我有更新换代的代码例子。

http://renaun.com/flex2/

用Flex2 Remote Object AMFO就更容易把Flex2和AMFO gateways连接起来。

例子和来源代码就在这儿。
You can find the example and source code here.
[/lang_zh]

  • Street

    You are extending NetConnection class which is sealed now. Adobe says we should not do it anymore. I have faced the following problem. The callback functions (AppendToGatewayUrl) are not working correctly anymore. The are not fired. Did you notice that? Do you have any ideas how to fix it?

  • http://www.renaun.com Renaun Erickson

    Here is the note in the Adobe Flex 2 documentation.

    Note: This class was dynamic in ActionScript 2.0 but is now sealed. To write callback methods for this class, you can either extend the class and define the callback methods in your subclass, or you can use the client property to refer to an object and define the callback methods on that object.

    I do not have an example of using AppendToGatewayUrl, it seems you have to implement its functionaliy yourself. If you have an example I can use to test it with I’ll take a look.

  • lobo

    I’m having the following error:

    ArgumentError: Error #2004

    On this line:
    gateway_conn.call.apply(gateway_conn,parameters);
    on the file: RemoteObjectAMF0.as

  • http://www.renaun.com Renaun Erickson

    What gateway are you connecting to AMFPHP, ColdFusion, etc…
    And what version of the gateway are you using?

    The actually remote call you are trying to make, what is the exact call and what type are the parameters?

  • lobo

    AMFPHP 1.2

    It seems it’s an intermittent problem. One of the parameters are an objetct. Sometimes it works, sometimes it don’t. Aparently with the same data, from the same place on the App. Still investigating, tough.

  • Pingback: Renaun Erickson

  • http://dersteppenwolf.wordpress.com/ derstepp

    hi.. thanks for your code!!!
    In this moment I am doing some research in using flex 2 with openamf, hibernate and spring.