Skip navigation
Purushotham Nayak
Currently Being Moderated

Cloning/Copying Webservice

May 23, 2012 7:38 PM

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

     }

}

 

.

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points