Hey guys,
I’m working on a new project and I’m stuck on this code.
var nc:NetConnection=new NetConnection();
nc.connect("http://localhost/amfphp/gateway.php");
var res:Responder=new Responder(onResult,onError);
goBtn.addEventListener(MouseEvent.MOUSE_DOWN, btnTrace);
my_ta.visible=false;
nc.call("Tutorials.getInfo",res);
function btnTrace(e:MouseEvent):void
{
trace("working fine");
}
function onResult(e:Object):void
{
for(var i:int=0;i < e.length;i++)
{
my_ta.appendText(+e*.CustomerID+"-"+e*.FirstName+" "
+e*.LastName+", "
+e*.DOB+", "
+e*.Phone+", "
+e*.Email+"
");
}
my_ta.visible=true;
}
function onError(e:Object):void
{
my_ta.text=e.toString();
my_ta.visible=true;
}
The code is working good and brings back the info from [COLOR=#0000ff]mysql[/COLOR] via amfphp, but I would like the “goBtn” to bring the info when pressed. Any suggestions would help.