# Animate shape

**URL:** https://forum.kirupa.com/t/animate-shape/24840
**Category:** flash
**Created:** [July 5, 2003, 9:47pm UTC](https://forum.kirupa.com/t/animate-shape/24840 "2003-07-05T21:47:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![honey4d](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@honey4d](https://forum.kirupa.com/u/honey4d)
#### Post date: [July 5, 2003, 9:47pm UTC](https://forum.kirupa.com/t/animate-shape/24840/1 "2003-07-05T21:47:57Z")

</div>

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](http://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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 5, 2003, 9:54pm UTC](https://forum.kirupa.com/t/animate-shape/24840/2 "2003-07-05T21:54:21Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 5, 2003, 11:08pm UTC](https://forum.kirupa.com/t/animate-shape/24840/3 "2003-07-05T23:08:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 5, 2003, 11:09pm UTC](https://forum.kirupa.com/t/animate-shape/24840/4 "2003-07-05T23:09:45Z")

</div>

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

-Aditya
