# How to draw dynamically from right to left?

**URL:** <https://forum.kirupa.com/t/how-to-draw-dynamically-from-right-to-left/52687>\
**Category:** Uncategorized\
**Created:** [May 26, 2004, 1:33pm UTC](https://forum.kirupa.com/t/how-to-draw-dynamically-from-right-to-left/52687 "2004-05-26T13:33:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kathari](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@kathari](https://forum.kirupa.com/u/kathari)\
**Post date:** [May 26, 2004, 1:33pm UTC](https://forum.kirupa.com/t/how-to-draw-dynamically-from-right-to-left/52687/1 "2004-05-26T13:33:13Z")

</div>

Hi,  
I am trying to make a square, using the drawing API. Since I want the lines I am making to show as they are drawn I ended up with this code:

```auto
_root.createEmptyMovieClip("ritax1", 2);
setProperty("ritax1", _x, 75);
setProperty("ritax1", _y, 50);
ritax1.lineStyle(0, 0x000000, 100);
this.onEnterFrame = function() {
	ritax1.lineTo(10, 0);
	ritax1._xscale += 300;
	if (ritax1._xscale>=2000) {
		ritax1._xscale = 2000;
	}
};

```

First, I am sure there is a smarter way to do this. Would anyone bother to tell me! Secondly and most important: How would I do to draw a line from right to left?
