1 Reply Latest reply on Jun 29, 2006 3:11 PM by katerini

    adding Effects to Rectangle

      I have a rectangle drawn using UIComponent and its graphics object. On it i need to have resize animation, but it seems as if it is not working. Below is the sample code. Can someone help in rectifying it.

      var comp:UIComponent = new UIComponent();

      var rs:Resize = new Resize(comp);
      rs.heightTo = 300;
      rs.duration = 2000;
        • 1. Re: adding Effects to Rectangle
          I had the same problem as you did. Resize does not work if you set "absolute" width and height values. Rather, Resize expects the width and height parameters to be percentage values. Thus, instead of Rectangle, use the Box class and specify the percentWidth and percentHeight of that control. You can specify the color of the Box by setting its backgroundColor style.