Movie clip alpha trail

I’m having trouble getting my movieclips to have trails that fade behind it. I’m having the dupilcate movieclips delete themselves once their alpha reaches a certain point. Any idea what’s wrong with my code? I’m pretty sure it has something to do with the counters.

You can view my fla here: http://www.immeldesign.com/help/helpMe!.fla

Thanks!

So, basically you want each dollar bill to be followed by a motion-blur trail (made of duplicates that alpha fade) right?

  • Jim

Here’s a link to a modified version which puts trails on the dollar bills.

Alpha Trails

Saved in Flash MX format.

Changes:

  • Removed scripts attached to each dollar bill, in favor of a single unified
    function (billFly).

  • Changed variables attached to root (such as moveX1 and myRot2) to variables attached to each dollarbill and referenced using this.varname from billFly().

  • Changed method for creating trails - no removeClip necessary. The trails are a collection of movies each of which follows the one before it using a short onEnterFrame handler.

  • Jim

Thanks for your help Jim. I appreciate you taking the time to describe everything in the file so I understand it, too.

Hi Jim,

I was going through the file and testing it, and if you click on bush’s head a few times the dollar bills disappear. I didn’t want that to happen? Do you know what the problem might be?

Ah, here it is:

setupTrails(bill1_mc,50);
setupTrails(bill2_mc,50+kNbrTrailClips+1);
setupTrails(bill3_mc,50+2*(kNbrTrailClips+1));

I’m assigning layers 50 thru 50+kNbrTrailClips*3 to the dollar bills. The bombs you are generating are using myCounter which increments each time you
generate a bomb. After you generate 50 bombs, the layers start to overlap. When a bomb uses the same layer as a bill, it obliterates the bill.

There are three ways, to fix it. You can start ‘myCounter’ (which is the layer number for the bombs) at a higher value than the bills use:

myCounter = kNbrTrailClips*4

OR you can decrement myCounter back to 0 after the bombs disappear

OR you can initialize myCounter to a low value (significantly below 50) before the loop that generates the bombs.

  • Jim