Drawing and animating a rectangle - MX2004

Seemingly simple question - I want to draw a rectangle (1px border, no fill) and then scale it using ActionScript. If I scale the movieclip, obviously the border scales as well. Is there any way to scale a dynamically created shape in ActionScript?

Thanks in advance,

Caroline.

research the drawing API

Drawing is not the problem - animating a scale is. What I wanted to know was if there is any way to do it without scaling each of the four vertices independently.

here you are :slight_smile: hope that helps there are better ways in flash 8 though…

In Flash 8, MovieClip.lineStyle method contains also scale parameter which could do the job, but unfortunately you are using MX 2k4… If you specify thickness of that line as 0, it will take it as hairline and draw it allways 1px wide.

Cheers mathew.er and icleric - I had found the additional noScale parameter in Flash 8 (which I’m actually using, but have to export to Flash 7 as the client wants it in 7) - but I hadn’t thought of specifying the line as 0, that’s completely fixed my problem. Thanks a million!=)