this is probably a noob question, but since I am new to Flash and AS3, here it goes...
Can I somehow re-use a AS3 NetConnection?
I am trying to create a AMFPHP class, that handles the connection, so I can re-use that initial connection whenever I want to make a call to a AMFPHP method.
Here is my code thus far,
package com.utils
{
public class amfphp
{
private var gateway:String = "http://localhost/amfphp/gateway.php";
private var connection:NetConnection = new NetConnection;
private function con(gate:String, con:NetConnection):void {
//connect to the gateway file
con.connect(gate);
return con;
}
}
}
Thanx in advance!