Is it possible to do the following with webservice ? When run via debugger both pws and ws are null in the constructor.
In main.mxml
public var ws:Webservice
<fx:Script>
ws = new WebService();
ws.addEventListener(FaultEvent.FAULT, onFault);
ws.addEventListener(LoadEvent.LOAD, onLoad);
var sc:someclass = new someclass(ws);
sc.useWs();
</fx:Script>
In someclass.as
public class someclass
{
private var pws:Webservice;
public function someclass(ws:WebService)
{
pws = ws;
}
private function useWs()
{
// use pws
}
}
.
North America
Europe, Middle East and Africa
Asia Pacific