4 Replies Latest reply on Jun 7, 2007 4:00 PM by marcusmattingly

    updateDisplayList problem

    marcusmattingly
      I have a very simple custom component (subclasses Canvas) I coded that overrides the updateDisplayList like so...


      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
      {
      super.updateDisplayList(unscaledWidth,unscaledHeight);

      for (var i:Number = 0; i < unscaledHeight; i+=15)
      {
      this.graphics.lineStyle(1,0xD2D2D2,1,true);
      this.graphics.moveTo(0,i);
      this.graphics.lineTo(unscaledWidth,i);
      }

      }


      Problem is I don't see the lines I drew. If I comment out the call to the super.updateDisplayList(), I see the lines I drew, but not the canvas background. I have looked at several samples. I thought I was overriding this correctly. What am I missing??

      Thanks.

      Marcus