|
-
KoolMoves Moderator
Acutally when you realize that the coords are just x and y positions it's easy.
just add
function drawit(coords){
if (idx<coords.length){//Not the end of the Array?
if (coords[idx]>=1000){//it's a moveTo
trace("MOVE");
//Move it
canvas.moveTo(coords[idx]/1000,coords[idx+1]/1000)
mc1._x=coords[idx]/1000;
mc1._y=coords[idx+1]/1000;
}//End if Move
if (coords[idx]==-1){//it's a Change Color
trace("color");
canvas.lineStyle (3,coords[idx+1],100)//assume line width of 1 and Alpha of 100
}//end if Change Color
if (coords[idx]>-1 && coords[idx]<1000){//It's a lineTo
// trace("line");
//draw the line to the coordinates
canvas.lineTo(coords[idx],coords[idx+1]);
mc1._x=coords[idx];
mc1._y=coords[idx+1];
} //end If lineTo
}//end if
idx=idx+2;
}//end function
where mc1 is a movieclip with a pencil image aligned on the center of the movieclip (there is one in the clipart)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|