Is there a better way than this code?

Hi

I was looking for a way to do simple shape tween to draw a line from point a to point b. I looked at the tweening class and couldn’t see anything that could help me.

So I did this: It works, but is there another easier way?? Will this type of code slow down swf playback?


[FONT=Courier New]
 
[LEFT]this.[COLOR=#0000ff]createEmptyMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"line2"[/COLOR], [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]getNextHighestDepth[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR];
line2.[COLOR=#0000ff]lineStyle[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000080]1[/COLOR], 0xFF0000, [COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR];
line2.[COLOR=#0000ff]moveTo[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000080]17[/COLOR], [COLOR=#000080]219[/COLOR][COLOR=#000000])[/COLOR];
line2.[COLOR=#0000ff]lineTo[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000080]18[/COLOR], [COLOR=#000080]219[/COLOR][COLOR=#000000])[/COLOR];
var i:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]18[/COLOR];[/LEFT]
 
[COLOR=#0000ff]onEnterFrame = [COLOR=#000000]function[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR][/COLOR]
[COLOR=#0000ff]
[COLOR=#000000]{[/COLOR]
[COLOR=#000000]     [/COLOR][COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR]i < [COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR]
[LEFT][LEFT][COLOR=#000000]     {[/COLOR][/LEFT]
 
[LEFT]     line2.[COLOR=#0000ff]lineTo[/COLOR][COLOR=#000000]([/COLOR]i, [COLOR=#000080]219[/COLOR][COLOR=#000000])[/COLOR];
     i++;
 
[COLOR=#000000]     }[/COLOR]
[COLOR=#0000ff]     else[/COLOR] [COLOR=#0000ff]if[/COLOR][COLOR=#000000]([/COLOR]i > [COLOR=#000080]100[/COLOR][COLOR=#000000])[/COLOR]
[COLOR=#000000]     {[/COLOR]
[COLOR=#000000]         [/COLOR]line2.[COLOR=#0000ff]stop[/COLOR][COLOR=#000000]([/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]     }[/COLOR][/LEFT]
 
[LEFT][COLOR=#000000]}[/COLOR][/LEFT]

[/LEFT]
[/COLOR][LEFT]
 
 
[LEFT][COLOR=#0000ff]setInterval[COLOR=#000000]([/COLOR][COLOR=#0000ff]onEnterFrame[/COLOR], [COLOR=#000080]1000[/COLOR][COLOR=#000000])[/COLOR];[/COLOR][/LEFT]
[COLOR=#0000ff]
 
[/COLOR]

[/FONT]

Does anyone have suggestions or am I making a non existent mountain out of a non existent anthill??

cheers for any ideas.

[/LEFT]