0 Replies Latest reply on Jan 23, 2008 4:33 AM by hanif_74

    Problem with component

    hanif_74
      Hi
      I made a movieclip with flash 8. Then I converted it to a component and wrote the following code in frame 1 of that :
      var Listener:Object = new Object();
      Counter = 0;
      Listener.onResize = function() {
      Counter++;
      trace("hanif"+Counter);
      mx.data.component.DataSet.clear();
      };
      Stage.addListener(Listener);
      Now if you convert this component to a compiled component and drag the compiled component to the main scene , the resize function will run several times.why?
      please help?