Animate shape

Hello

I found the following code within a tutorial on the Kirupa website showing how to draw a square using ActionScript but I was wondering if it would be possible to modify this so that each line is animated in turn to construct a square (similar to the mouseover effect on the www.fontsforflash.com website (right column ‘Showcase’ graphic)):

_root.createEmptyMovieClip(“holder”,1);
holder.lineStyle(1,0,100);
// This is half the width of the square
width=30;
// The center of the square is (150,150)
holder.moveTo(150-width,150-width);
holder.lineTo(150+width,150-width);
holder.lineTo(150+width,150+width);
holder.lineTo(150-width,150+width);
holder.lineTo(150-width,150-width);

Any suggestions would be appreciated.

Many thanks.

Jon

hmm… before I start… I want to ask you if you “need” to do this with drawing API…

can u just use shape or motion tweening?

-Aditya
just checking cause if you dont need to use Drawing API… much cleaner faster way would be motion tween

It’s much easier if you just use a mask. They probably used it aswell.

ypu… thanks for reminding me [m]… a mask would be a lot easier… :stuck_out_tongue:

-Aditya