hey thanks for the help....[?] but it still didnt work....
here is my CODE::::


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute"
xmlns="*"
                               creationComplete="initApplication()">


                               <mx:DataGrid dataProvider="{dP}">
               <mx:columns>
                       <mx:DataGridColumn headerText="UserName"
dataField="username">

                       </mx:DataGridColumn>
                </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>



here is my php code::::


<?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, "root","venkirock");
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 );
}
}
?>


here is my package which i hav defined ::::


package
{
    import flash.net.NetConnection;
    import flash.net.ObjectEncoding;

    public class RemotingConnection extends NetConnection
    {
        public function RemotingConnection( sURL:String )
        {
            objectEncoding = ObjectEncoding.AMF0;
            if (sURL) connect( sURL );
        }

        public function AppendToGatewayUrl( s : String ) : void
        {
            //
        }
    }
}



The error which i got is:::




Error #2044: Unhandled NetStatusEvent:. level=error,
code=NetConnection.Call.BadVersion
    at a/initApplication()[C:\Documents and Settings\rakshith\My
Documents\Flex Builder 3\a\src\a.mxml:22]
    at a/___a_Application1_creationComplete()[C:\Documents and
Settings\rakshith\My Documents\Flex Builder 3\a\src\a.mxml:3]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at
mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:9298]
    at mx.core::UIComponent/set
initialized()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
    at
mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:718]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at
mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
    at
mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]



can someone tell me wat i shd do in order  to resolve this.....
plzzzz
thanks

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

<<inline: 330.png>>

Reply via email to