# Using Actionscript and the drawing API to animate a line (2 points) to 2 new points

**URL:** <https://forum.kirupa.com/t/using-actionscript-and-the-drawing-api-to-animate-a-line-2-points-to-2-new-points/257745>\
**Category:** flash\
**Created:** [April 16, 2008, 6:59pm UTC](https://forum.kirupa.com/t/using-actionscript-and-the-drawing-api-to-animate-a-line-2-points-to-2-new-points/257745 "2008-04-16T18:59:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tompixelart](https://avatars.discourse-cdn.com/v4/letter/t/74df32/32.png) [@tompixelart](https://forum.kirupa.com/u/tompixelart)\
**Post date:** [April 16, 2008, 6:59pm UTC](https://forum.kirupa.com/t/using-actionscript-and-the-drawing-api-to-animate-a-line-2-points-to-2-new-points/257745/1 "2008-04-16T18:59:28Z")

</div>

hi everybody - what is the best way to go about this?

at its most basic - i need to \*\*animate a line’s beginning and end points using tweener to 2 new points somewhere else on the stage. \*\*

my first thought is to start with the excellent 3d spinning cube example that kirupa made on [kirupa.com](http://kirupa.com) and backtrack from there.  
[http://www.kirupa.com/developer/actionscript/faces\_depths.htm](http://www.kirupa.com/developer/actionscript/faces_depths.htm)  
but i’m hoping to find a much simpler and efficient way of accomplishing what i need.

the problem that i know i need to get around is this… i have to find a way to have the **Tweener** class give me updated positions of the x and y of the two points which make up the lines. and somehow i have to use the drawing api to ‘get inside of’ tweener to update the stage accordingly - reason for this is that these lines will need to use the elastic tween and bounce around a bit.

i’d appreciate any help

cheers! - tom
