2 Replies Latest reply on Jul 5, 2006 3:01 PM by jordan brough

    Resize effect bug?

    jordan brough
      In the mxml file below, if you click 'Expand' the red box on the right uses a Resize effect to grow, but it ends up expanding way off the screen (producing a scrollbar in the application window briefly). Since I have specified 'absolute' layout, shouldn't the Resize effect respect the 'right="0"' constraint and expand the red box to the left instead of to the right?

      Is there another way of doing this?

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*"
      width="100%" height="400" backgroundColor="yellow" >

      import mx.effects.Resize;

      private var resize:Resize = new Resize();

      private function expand():void
      resize.target = right_box;
      resize.heightBy = 0;
      resize.widthTo = this.width;
      resize.duration = 1000;


      <mx:HBox id='left_box' width="200" height="100%" left="0" backgroundColor="blue" />
      <mx:HBox id='right_box' width="200" height="100%" right="0" backgroundColor="red" >
      <mx:Button label="Expand" click="expand()" />
      <mx:Button label="Contract" click="right_box.width=200;" />

        • 1. Re: Resize effect bug?
          Flex harUI Adobe Employee
          Well, I suppose we could add support to resize to tell it to move as well as resize, but we're not setup that way. You can add a move effect that will do what you want.

          Objects that are affected by effects don't listen to constraints and such because otherwise those things could block the effect.
          • 2. Re: Resize effect bug?
            jordan brough Level 1
            Thanks for the reply. By "we", do you mean you are on the Flex developer team?

            If I use a Move effect in parallel with a resize effect, won't there be synchronization issues? Won't the right edge of the right box wobble around? Could you give me an example of what you mean?