2 Replies Latest reply on Jul 2, 2008 10:53 PM by semony_TT

    Scaling Help /. .\

    semony_TT
      Hello experts,

      I got an issue here with scaling.

      I set scaleX and scaleY on a canvas and at this stage its all good.
      all its children are also scaled, which is also nice.!

      BUT, theres this one specific child object I dont want scaling applied onto it.. how do i do that?

      Can anyone please tell me how I can disable scaling on a object?


      e.g. I want to have a 5x5 rectangular shape that is never affected by the scaling of its parent

      override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
      with(graphics){
      clear();
      lineStyle(1, getStyle("themeColor"), .5, false, LineScaleMode.NONE);
      beginFill(0xffffff, .5);
      drawRect(0,0,5,5);
      endFill();
      }
      }



      A little help from any one of you experts please I am kind of stressed..ha
        • 1. Re: Scaling Help /. .\
          Gregory Lafrance Level 6
          I wonder if you can have an event listener for the resize event and call either preventDefault() or stopImmediatePropagation()
          • 2. Re: Scaling Help /. .\
            semony_TT Level 1
            quote:

            Originally posted by: Greg Lafrance
            I wonder if you can have an event listener for the resize event and call either preventDefault() or stopImmediatePropagation()


            Hi Greg,

            I tried your method but the event didnt seem to work.
            it fired on first draw tho.

            t.addEventListener( ResizeEvent.RESIZE, function(e:ResizeEvent):void{
            trace("here");
            e.stopImmediatePropagation();
            e.preventDefault();
            });