0 Replies Latest reply on Nov 29, 2007 11:29 AM by FFBear

    Address instance of class with webserviceconnector

    FFBear
      Hi,

      what am I missing here?
      I'd like to create a movieclip which has linkage to a class.
      The class should have a function that calls a webservice that returns some data.
      The movieclip itself has an instance - i_checkHolder - which just is a graphic box,
      Now to my, I guess novice, problem:

      How do I address the "i_checkholder" of the current instance of this class ?
      I can not obviously use _this_ since that is the webserviceconnector itself.

      Cut code:

      import flash.events.*;
      import mx.data.components.WebServiceConnector;

      class AwcGroup extends MovieClip {
      ...
      ...

      function initChecks():Void {
      var wsConn:WebServiceConnector = new WebServiceConnector();
      wsConn.addEventListener("result", renderChecks(groupId));
      wsConn.WSDLURL = " http://sestivex01d/monitorws/amon.asmx?wsdl";
      wsConn.operation = "GetMonitorGroupChecks";
      wsConn.params = [groupId, false];
      wsConn.suppressInvalidCalls = true;
      wsConn.trigger();
      }

      function renderChecks(evt:Object) {
      this["i_checkholder"]._alpha = 40; // I know this is wrong
      }
      ...
      ...
      }

      I would be grateful for any reply,
      Thanks