1 Reply Latest reply on May 17, 2006 10:38 AM by Newsgroup_User

    Flex 2 - beta 3: mx.effects.resize

    [sami]
      mx.effects.resize works fine when setting both widht and height:
      var myResize:Resize = new Resize(targetObject);
      myResize.widthFrom = targetObject.width;
      myResize.widthTo = targetObject.width+100;
      myResize.heightFrom = targetObject.height;
      myResize.heightTo = targetObject.height+100;
      myResize.duration = tweenDuration;
      myResize.play(null, false);

      setting only width or height does not:
      var myResize:Resize = new Resize(targetObject);
      myResize.heightFrom = targetObject.height;
      myResize.heightTo = targetObject.height+100;
      myResize.duration = tweenDuration;
      myResize.play(null, false);

      anyone noticed the same problem?
      Tried playing with different combinations of heightBy, widthBy but no success so far..
        • 1. Re: Flex 2 - beta 3: mx.effects.resize
          Level 7
          Hello -

          I know some changes went into the Resize effect during the Beta III
          timeframe, so it is possible that your issue has been fixed. Could you
          describe a bit more in detail what you are seeing when you only set the
          width or height properties on the Resize effect (ie: what do you mean by it
          does not work fine)?

          Basically in your code below, the second case would show the control
          animating and growing height-wise while keeping its original width. I tried
          your sample code below on our internal builds (post Beta III) and on the
          Beta III build and the resizing looked correct.

          More details would be great - thanks!

          Deepa Subramaniam
          Flex SDK Developer


          "[sami]" <webforumsuser@macromedia.com> wrote in message
          news:e4fbgl$7of$1@forums.macromedia.com...
          > mx.effects.resize works fine when setting both widht and height:
          > var myResize:Resize = new Resize(targetObject);
          > myResize.widthFrom = targetObject.width;
          > myResize.widthTo = targetObject.width+100;
          > myResize.heightFrom = targetObject.height;
          > myResize.heightTo = targetObject.height+100;
          > myResize.duration = tweenDuration;
          > myResize.play(null, false);
          >
          > setting only width or height does not:
          > var myResize:Resize = new Resize(targetObject);
          > myResize.heightFrom = targetObject.height;
          > myResize.heightTo = targetObject.height+100;
          > myResize.duration = tweenDuration;
          > myResize.play(null, false);
          >
          > anyone noticed the same problem?
          > Tried playing with different combinations of heightBy, widthBy but no
          > success
          > so far..
          >