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.
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.
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?
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.