Wave help

I’ve learned a lot from the ppl here and now I need some specific help. I am working on getting the movie to look like boat spray, but it’s not quite working out…I did get an interesting effect out of it though :slight_smile:

Here’s the code:

  
onClipEvent (load) {
ang = 0;
screenY = 300;
freq=Math.random()*24;
amp=Math.Random()*100;
wavecnt=0;
this._x=0;
this._y=screenY;
}
onClipEvent(enterFrame) {
this._alpha=Math.random()*100;
this._xscale=this._yscale=Math.random()*25;
ang += 10;
this._x += freq;
this._y = screenY + -Math.abs(Math.sin(Math.PI/180 *ang )*amp);
if (ang == 180){
freq/=2;
amp/=2;
alpha/=2;
wavecnt++;
}
if (wavecnt>=3){
removeMovieClip(this);
}
}
 

I was thinking about it this morning and realized that angle will never equal zero and that I probably need to change it to screenY…I would like it to be a continual spray where each clip moves out from the boat in a sine like wave. As it gets farther away from the boat its amplitude should be less and I would like it to fade out. After 3 waves, the clip should be removed(my effort at trying to make it continuous–one leaves so it adds another clip…) The spray should be a little random so that it doesn’t look like one stream…

If anyone can make sense of what I’m trying to do and can offer some pointers, I appreciate it!

Thanks,
M