Flex AMFPHP and VO’s (RemoteObjectAMF0 update)

July 25th, 2006 英文

由Flex Coders List的一些人, 我能够更新换代 Remote Object AMFO,给几个怎么用AMFPHP和PHP/AS
VO的例子。用PHP 5.1.1和PHP 4.3.11可以做得到。

在过程中我学到一些事情。其一,
在Flex和AS3用[ArrayElementType("com.renaun.samples.vo.BookVO")]
你能定义ArrayCollection的object type。

[code lang="javascript"]
[ArrayElementType("com.renaun.samples.vo.BookVO")]
public var books:ArrayCollection;
[/code]

为了在PHP 4用BookVO.php你需要把”public”改到”var”。

现在Remote Object AMFO包有两个例子。第一个是更新换代的Cairngorm注册例子 (例子/代码程序)。

我刚创造的是一种non-Cairngorm AMFPHP的例子 (例子/代码程序)。

注意, 我改namespace到 “com.renaun.”不是原来的 “com.multispan.”。

感谢Robert Was, 他给我代码程序的一部分。

[更新换代]

.
AS Remote class的登录做错了。必得用[RemoteClass(alias="com.renaun.samples.vo.BookVO")],
别用以前的registerClass的方法。感谢Andrea的注意。

我有更新换代代码的例子, 所以按数据网项目的时候他会在label field把名字表现出来。

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

12 Comments Add your own

  • 1. Simon Barber  |  July 25th, 2006 at 7:55 am

    Thats awesome Renaun. My next challenge is to try and get Class Mappings to work with CakePHP.

  • 2. diamondtearz  |  July 25th, 2006 at 9:09 pm

    Thank you for that. I was able to get some results back from my server with it and extend it to add an image for each book. That’s the first time I clearly understood the nature of the server-side value objects in AMFPHP.

  • 3. Renaun Erickson  |  July 25th, 2006 at 9:10 pm

    Simon, do you have some sample code I can play with in CakePHP to help with?

    Diamond, Glad to here it help.

  • 4. Renaun Erickson&hellip  |  July 26th, 2006 at 11:59 pm

    RemoteObjectAMFO update to latest Cairngorm

    The RemoteObjectAMF0 class and sample code have been updated to reflect the latest Cairngorm package. You can find Cairngorm for Flex2 on the labs.adobe.com site. I will not be packaging Cairngorm with my RemoteObjectAMF0 samples any more.
    There ar…

  • 5. Marcelo Serpa  |  August 13th, 2006 at 6:54 am

    Awesome work Renaun.

    @Simon: I´m also trying to do that… currently I´m still experimenting. Get to #cakeamfphp when you´ve got the time!

    Cheers,

    Marcelo.

  • 6. Fabian  |  April 1st, 2007 at 9:32 am

    the sample doesnt work :-(

    You are using your API Service in the services.mxml

  • 7. Renaun Erickson  |  April 1st, 2007 at 9:43 pm

    The “Services.mxml” has “http://localhost/amfphp1_2/gateway.php” defined, you need to replace it with your own gateway location. Is there something more specific that has an issue?

  • 8. Dan Van Brunt  |  May 27th, 2008 at 8:30 am

    Does your RemoteObjectAMF0 work with Flex 3?
    I’m getting the error:
    “VerifyError: Error #1053: Illegal override of RemoteObjectAMF0 in com.renaun.rpc.RemoteObjectAMF0.

    param count mismatch
    virt params=3 optional=1 mx.rpc::AbstractService/setCredentials()
    over params=2 optional=0 mx.rpc::AbstractService/setCredentials()

    When I look in the language ref for flex 2 and flex 3 I noticed that the AbstractService class has a different number of parameters for 2 vs 3.

    What are my options here?

  • 9. Renaun Erickson  |  May 27th, 2008 at 11:44 am

    Change the setCredential method code to the following in RemoteObjectAMF0.as

    override public function setCredentials( username:String, password:String, charset:String = null ):void
    {
    gateway_conn.setCredentials( username, password, charset );
    }

  • 10. Flex with PHP « It&&hellip  |  October 13th, 2008 at 9:47 pm

    [...] Renaun Erickson :: Flex AMFPHP and VO’s (RemoteObjectAMF0 update) [...]

  • 11. Fx-PHP « Flex Gener&hellip  |  October 14th, 2008 at 1:24 am

    [...] Renaun Erickson :: Flex AMFPHP and VO’s (RemoteObjectAMF0 update) [...]

  • 12. Quick Links for Technolog&hellip  |  April 24th, 2009 at 7:28 pm

    [...] Renaun Erickson :: Flex AMFPHP and VO’s (RemoteObjectAMF0 update) [...]

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


About: I work as a Platform Evangelist for Adobe Systems Incorporated.

My Amazon.com Wish List

Calendar

July 2006
S M T W T F S
« Jun   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Most Recent Posts


Flex.org - The Directory for Flex