Well I've exposed a dump of the actionscript object easily enough that's
being returned and the object in PHP is just a result from a MySQL query.
I can get at the data currently, but if you notice down below, there aren't
any named references for the columns, which make it nearly impossible to
using bindings.
public function getProjects():void
{
amfConnection.call( "Something.getProjects", new
Responder(getProjectsOnResult, OnFault), userInfo.uid);
}
public function getProjectsOnResult( result:Object ) : void
{
var projectDP:ArrayCollection = new ArrayCollection();
for( var i in result.serverInfo.initialData) {
var name:String = result.serverInfo.initialData[i][3];
var pid:String = result.serverInfo.initialData[i][0];
projectDP.addItem({name:name, pid:pid});
}
projects.labelField = "name";
projects.dataProvider = projectDP;
}
The old phrase of "If it ain't broke, don't fix it" comes to mind when I see
whats being returned ala AMF3. Any suggestions you can make would be greatly
appreciated.
Cheers,
Kevin
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Samuel R. Neff
Sent: Thursday, November 01, 2007 2:14 PM
To: [email protected]
Subject: RE: [flexcoders] AMFPHP & Flex 3 Beta
We use Fluorine and NetConnection directly.. much smaller than using the mx
rpc classes and is more future proof since NetConnection is built into the
player and won't change whereas rpc classes don't even have source available
and have a history of breaking stuff in hotfixes with 3rd party AMF
implementations.
I don't think any of the "proper" wrappers of NetConnection provide data
reformatting for AMF--that's provided by the player. With Fluorine we
certainly don't see things coming back ugly or restructured. So perhaps the
better quest to ask is to show a dump of the data in PHP and then in AS3 and
ask for how to get it to what you want (stating what you want of course).
HTH,
Sam
-------------------------------------------
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
_____
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Kevin Aebig
Sent: Thursday, November 01, 2007 11:20 AM
To: [email protected]
Subject: [flexcoders] AMFPHP & Flex 3 Beta
Hey all,
I've seen all kinds of posts and suggestions from people online suggesting
various ways to connect to an AMFPHP service, but I want to do it the
*proper* way. I'm somewhat old school and have made connections with
NetConnection, but the data that comes back from a MySQL result is ugly and
has obviously been restructured.
What's the best way and can someone provide an example of using this method
in AS3?
Thanks for your time,
!k