Copy link to clipboard
Copied
Hey I am looking for a example of making a wavy line wave animation. I have not been able to find one. Does anyone have one or seen one?
Copy link to clipboard
Copied
Not sure exactly what you're after, but this should be pretty easy to do - either with something like TweenLite/Max and it's bezier tweening, or with the regular Graphics methods - just clear and draw on each frame...
Here's a simple example - just paste this into frame 1 of a new .fla:
var a:Array = [new Point(10,10), new Point(50,50), new Point(100,10)];
var inc:int = -2;
addEventListener(Event.ENTER_FRAME, update);
function update(e:Event):void
{
graphics.clear();
graphics.lineStyle(1,0xff0000);
graphics.moveTo(a[0].x, a[0].y);
graphics.curveTo(a[1].x, a[1].y, a[2].x, a[2].y);
a[1].y += inc;
if(a[1].y < 0 || a[1].y > 150){
inc *= -1;
}
}
Copy link to clipboard
Copied
I want it to be more like this and the wave move accross the line.
Copy link to clipboard
Copied
mask the display region, add a full wave (double what you showed) movieclip 1/2 of which is not shown because of the mask and tween the movieclip's x property