Just trying to break out a function that was working fine within flash to it's own class and I keep getting an error on code that's not there!!
and in the fla I have:Code:package { // Imports import flash.net.*; public class vdm { public var gw:NetConnection = new NetConnection(); public var res:Responder = new Responder(onResult,onFault); public var d:Array = responds.serverInfo.initialData; public var responds:Object; public function onResult(responds:Object) { trace("success "+responds); } function onFault(responds:Object):void { for (var i in responds) { trace("fault "+responds[i]); } } } // End Class } // End package
Works fine if I put the vars and function in flash and publish it:Code:gw.connect("gatewayPath"); gw.call("GrabData.GetData", res);
but, when I make it an .as file and compile it, I get:Code:import flash.net.*; //text_txt.htmlText=" "; var gw:NetConnection = new NetConnection(); gw.connect("gatewayPath"); var res:Responder = new Responder(onResult,onFault); function onResult(responds:Object):void { trace("success "+responds); var d:Array = responds.serverInfo.initialData; } function onFault(responds:Object):void { for (var i in responds) { trace("fault "+responds[i]); } } gw.call("GrabData.GetData", res);
1180: Call to a possibly undefined method addFrameScript
addFrameScript(0,frame1);
??


Reply With Quote