hi.. when i execute the below code i get the following error:::
Severity and Description Path Resource Location Creation Time Id 1046: Type was not found or was not a compile-time constant: RemotingConnection. b744/src b744.mxml line 17 1240367603625 854 Severity and Description Path Resource Location Creation Time Id 1180: Call to a possibly undefined method RemotingConnection. b744/src b744.mxml line 21 1240367603625 855 so can someone help me out... thanks On Tue, Apr 21, 2009 at 10:41 AM, BB47 <[email protected]> wrote: > > Please check this > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml" > xmlns="*" > creationComplete="initApplication()"> > <mx:DataGrid dataProvider="{dP}"> > <mx:columns> > <mx:DataGridColumn headerText="User Name" > columnName="username"/> > </mx:columns> > </mx:DataGrid> > <mx:Script> > <![CDATA[ > [Bindable] > public var dP:Array; > import flash.net.Responder; > public var gateway:RemotingConnection; > > public function initApplication() > { > gateway=new RemotingConnection(" > http://localhost/test/test.php"); > gateway.call("sample.getUsers", new > Responder(onResult, onFault)); > } > > public function onResult(result:Array):void > { > dP=result; > } > > public function onFault(fault:String):void > { > trace(fault); > } > ]]> > </mx:Script> > </mx:Application> > > > test.php > > <?php > // Create new service for PHP Remoting as Class > class sample > { > function sample () > { > // Define the methodTable for this class in the constructor > $this->methodTable = array( > "getUsers" => array( > "description" => "Return a list of users", > "access" => "remote" > ) > ); > } > function getUsers () { > $mysql = mysql_connect(localhost, "username"); > mysql_select_db( "sample" ); > //return a list of all the users > // Create table users, first > $Query = "SELECT * from users"; > $Result = mysql_query( $Query ); > while ($row = mysql_fetch_object($Result)) { > $ArrayOfUsers[] = $row; > } > return( $ArrayOfUsers ); > } > } > ?> > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

