Making line draw itself

I’ve hit a wall. I need to make a line look like it’s drawing itself, as if an invisible hand is drawing on the screen. For some reason, though, I can’t figure out or find how to do this.

Could anybody link me to a tutorial or tell me how I might do this? I really appreciate any input in advance. :smirk:

-Jacob

Take a look at the drawing board tutorial on this site, and maybe also the thinggy in the AS tricks section about the drawing API.

Cheers.
pom :hangover:

Thanks, but the drawing API tutorial doesn’t show me how to make it look like the drawing is being done as you watch it…it just makes the shapes/lines.

The drawing forum covers artwork mostly too, which is off-topic. :-\

Thanks, though, for the reply! I learned some new stuff from the API tut.

-J

Put your points in a array and then draw onEnterFrame. Something like this:

// Array of points
myPoints=[];
// Fill the array with random points
for (var i=0;i < 50;i++){
	myPoints.push({x:Math.random()*Stage.width,y:Math.random()*Stage.height});
}
// handler that draws
this.lineStyle(1,0,100);
this.moveTo(myPoints[0].x,myPoints[0].y);
this.onEnterFrame=function(){
	++j;
	if (j < myPoints.length){
		this.lineTo(myPoints[j].x,myPoints[j].y);
	}
	else delete this.onEnterFrame
}

pom :hangover:

check this out and let me know if this is what you want to do
http://www.expocaribbean.com/uwantmore/bmv_menu.swf
if so you just make shape tweens and put a alpha on the first frame of each shape tween

Grim

*Originally posted by grimdeath *
**check this out and let me know if this is what you want to do
http://www.expocaribbean.com/uwantmore/bmv_menu.swf
if so you just make shape tweens and put a alpha on the first frame of each shape tween

Yeah, that’s what I had in mind. The shape tweens work like I need them too. Thanks grimdeath and ilyaslamasse for your help.

-J

np glad i could help :smiley:

Grim