this is probably a noob question, but since I'm new to Flash and AS3, here it goes ...
Is there any way to reuse AS3 NetConnection?
I am trying to create an AMFPHP class that handles a connection, so I can reuse this initial connection when I want to make an AMFPHP method call.
Here is my code so 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 {
con.connect(gate);
return con;
}
}
}
Thanx in advance!
source
share