So this is the idea… i made an animation following a motion guide and i drew a line from animated movie clip’s previous position to its current position. The problem is that with curves this method is very unprecise… the edges are much too jagged even with the event firing every milisecond.
Here are the some pictures to see what I’m talking about. This is how it’s supposed to be:
http://www.kirupa.com/forum/attachment.php?attachmentid=49076&stc=1&d=1233747651
and this is how it turns out
http://www.kirupa.com/forum/attachment.php?attachmentid=49077&stc=1&d=1233747731
So basically my question is if it’s possible to create a nice curved animation using my method or do I have to draw it manually using lineTo and curveTo and snychronise it to the MovieClip’s movements or maybe creating some sort of mask to reveal the already drawn symbol? Thank you for you answers
edit:
my code if it helps:)
var shape:Shape = new Shape();
this.addChild(shape);
shape.graphics.lineStyle(1, 0x000000);
var drawTimer:Timer = new Timer(1);
drawTimer.addEventListener(TimerEvent.TIMER, drawProgress);
var previousX:Number = this.laser_tip_mc.x;
var previousY:Number = this.laser_tip_mc.y;
drawTimer.start();
function drawProgress(event:TimerEvent):void{
var drawX:Number = this.laser_tip_mc.x;
var drawY:Number = this.laser_tip_mc.y;
shape.graphics.moveTo(previousX, previousY);
shape.graphics.beginFill(0x000000);
shape.graphics.lineTo(drawX, drawY);
shape.graphics.endFill();
previousX = this.laser_tip_mc.x;
previousY = this.laser_tip_mc.y;
}