# Flash Remoting on Windows machine

**URL:** <https://forum.kirupa.com/t/flash-remoting-on-windows-machine/134396>\
**Category:** Uncategorized\
**Created:** [January 18, 2005, 6:59am UTC](https://forum.kirupa.com/t/flash-remoting-on-windows-machine/134396 "2005-01-18T06:59:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clem\_c\_rock](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@clem\_c\_rock](https://forum.kirupa.com/u/clem_c_rock)\
**Post date:** [January 18, 2005, 6:59am UTC](https://forum.kirupa.com/t/flash-remoting-on-windows-machine/134396/1 "2005-01-18T06:59:57Z")

</div>

Hello, I’ve been working on a mac w/ Flash Remoting in MX2004 pro for about 6 months now w/ great results.

I’ve been trying to work on Remoting projects on my home computer (windows) w/ Flash mx2004 pro and can’t get the remoting to work.

First, the remoting wouldn’t work if I had these includes:  
#include “NetServices.as”  
#include “NetDebug.as”

if I used this instead it worked:

import org.amfphp.remoting.NetServices;  
import org.amfphp.remoting.NetDebug;

Now the problem is that I can’t make calls to my remoting class to return Mysql data.

For instance:

Basic class:

class db\_interface # extends verify\_login  
{  
function db\_interface()  
{  
$this-\>methodTable = array  
(  
“get\_show\_data” =\> array  
(  
“description” =\> “Get show according to login”,  
“access” =\> “remote”  
)  
);  
}

```
   function get_show_data( )
   {
         $conn_id = mysql_pconnect( 'localhost', 'username', 'password' ); 
         mysql_select_db ( 'db' );
         $select_shows = "SELECT * FROM shows";
         $result_shows = mysql_query( $select_shows, $this-&gt;conn_id );
   
         return $result_shows;             
  }

```

}

now in my actionscript I have this:

import org.amfphp.remoting.NetServices;  
import org.amfphp.remoting.NetDebug;

main\_responder = new Object();  
NetServices.setDefaultGatewayUrl("…/gateway.php");  
var conn = NetServices.createGatewayConnection();  
service = conn.getService(“db\_interface”, main\_responder );

main\_responder.get\_show\_data\_Result = function( data )  
{  
txt\_output += "  
len: " + data.getLength(); // !! Will not show  
length

```
     for( i=0; i &lt; data.getLength(); i++) // !! This will not work
     {   
          txt_output += "

```

i: " + i;  
}  
}  
service.get\_show\_data();

As you can see something is strange here.

Any Ideers?

Clem C
