# drawBox and the tween.?

**URL:** <https://forum.kirupa.com/t/drawbox-and-the-tween/251727>\
**Category:** flash\
**Created:** [February 12, 2008, 2:09am UTC](https://forum.kirupa.com/t/drawbox-and-the-tween/251727 "2008-02-12T02:09:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrbi](https://avatars.discourse-cdn.com/v4/letter/h/f475e1/32.png) [@hrbi](https://forum.kirupa.com/u/hrbi)\
**Post date:** [February 12, 2008, 2:09am UTC](https://forum.kirupa.com/t/drawbox-and-the-tween/251727/1 "2008-02-12T02:09:38Z")

</div>

[LEFT]Please help me understand guys…

I cant seem to understand the drawBox methods…

I have a button, and onPress the button trigger a shape which appears. How can i apply the tween values to a shape, made with the drawing API?

```auto
 
this.createEmptyMovieClip("squareClip",this.getNextHighestDepth());
 
with(squareClip){
   
lineStyle()
moveTo(x,y)
lineTo(x,y)
lineTo (x,y)
lineTo(x,y)l
ineTo(x,y)
 
 
}

```

With some correct data in the above code, how can i apply first a event function, so that the hole thing starts, after i pressed the button.

And the second: After click, i dont want the shape just to appear instantly, how can i apply a tween value to it?

So it bounces or scales from small to big…

```auto
 
var shapeTween:Tween = new Tween(null, "", Bounce.easeOut, 100, 0, 2, true);

```

Please advice…

Regards Hrbi  
[/LEFT]
