# API drawing, can it be animated?

**URL:** <https://forum.kirupa.com/t/api-drawing-can-it-be-animated/161361>\
**Category:** flash\
**Created:** [September 3, 2005, 5:58am UTC](https://forum.kirupa.com/t/api-drawing-can-it-be-animated/161361 "2005-09-03T05:58:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spirit\_Z3RO](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Spirit\_Z3RO](https://forum.kirupa.com/u/Spirit_Z3RO)\
**Post date:** [September 3, 2005, 5:58am UTC](https://forum.kirupa.com/t/api-drawing-can-it-be-animated/161361/1 "2005-09-03T05:58:46Z")

</div>

Can the process of my API drawing be animated?  
What’s wrong with the code below?

\_root.createEmptyMovieClip(“myLine”,1);  
myLine.lineStyle(1,0x000000,100);  
myLine.moveTo(30,100);  
xSpeed = 2;

myLine.onEnterFrame = function(){  
myLine.lineTo(myLine.\_x+xSpeed,100);  
}
