Increasing a line

Ok, I here is another question for ya fellas. I want my movie to start out with a line which is 1 pixel long. Then I want to increase it to 500 pixels in 36 frames. I can do this without actionscript by just going down 36 frames and increasing the line then creating a motion tween, but I would like to see this done in actionscript. Can anyone show me how to do this or point me in the right direction?
Thanks

umm perhaps you can do something with the drawing api section of actionscript tricks…? like an onClipEvent(enterFrame) loop… just move the lineTo() point farther to the right each time… till its 500 pixels away…

http://www.kirupa.com/developer/actionscript/as_tricks.asp

alright buddylee, here’s how she goes; It’s a simple case of _xscale or _yscale, depending on the orientation of your line. In Flash make a line, if you make it 100 pixels long (or tall) it’s easiest, because then the size you want the line to be in pixels is also the size of the line in a percentage.

So once you have a line movieClip with an instaceName, set its _xscale (or _yscale) starting from your initial size of one and going up to whatever (~500).

if (line._xscale < 500)
line._xscale += 5;

put this in a frame loop or in an onClipEvent(enterFrame) command on the movie clip and you’ll have your animation.

NOTE:: changing the scale will always adjust the size proportionally around the centre, so changing where the centre of the movie clip is will make you line ‘grow’ in different ways. IE aligning the centre to the left edge of the line will make it grow like a progress bar.

I am sorry, I forgot to say that I want the line to grow from 1 pixes to 500 pixels. That is what I am trying to accomplish. Therefore, it will not have to do with the xscale and yscale, but the height of the line. Can someone tell me how to increase the line?
Sorry for leaving out that very important fact

It does work, as long as what I think a line growing is the same as what you think it is. Here’s an FLA with two possible solutions, one with _xscale and _yscale and one using the Flash drawing commands. The scale solution is shorter and more elegant.

let me know how it goes

Thank you, this is the answer I was looking for. I think I can take all the pieces from this and rearrange it to what I need to.
Thanks again