One for the specific projects/effects section.
FADING TRAIL EFFECT
You've probably seen the effect which is used in flashes like the slow-mo scene of Xiao Xiao 3, and various other 'bullet-time'-style movies.
It basically consists of copies of the character, running a frame, or several frames, behind the main one, and alpha'd down.
Crappy example
It's certainly possible to create this effect purely via animation. But, there's a much simpler way, and it goes a little something like this:
Make your animation inside an Movie Clip. If you don't intend to loop it, add a stop(); action on the final frame.
Exit edit mode, select the MC on stage, and give it the Instance Name 'pie'
IF YOU ARE NOT INTENDING TO LOOP THE ANIMATION:
Press F9, and add these actions:
onClipEvent (load) {
numCopies = 5; //Number of copies to make, adjust as you wish
this.swapDepths(1100); //Make sure the original MC is at the 'top of the pile'
if (_name == "pie") { //Only run this code from the original MC, not the dupes
for (i=1; i<numCopies+1; i++) {
duplicateMovieClip("_root.pie", "dmc"+i, i+1000);
_root["dmc"+i].nm = i; //Holds the # of the MC
_root["dmc"+i].af = 100/numCopies; //Used to calculate the amount to fade each MC
_root["dmc"+i].onEnterFrame = function() {
with (this) {
if (_root.pie._currentframe == _root.pie._totalframes) { //If main MC has finished, fade dupes out
_alpha-=af;
if(_alpha<=0) {this.removeMovieClip();}
} else {
gotoAndStop(_root.pie._currentframe-nm); //Go to frame, based on 'distance' behind main MC
_alpha = 100-(af*nm); //Set alpha based on 'distance' behind main MC
}
}
};
}
}
}
IF YOU ARE INTENDING TO LOOP THE ANIMATION:
Press F9, and add these actions:
onClipEvent (load) {
numCopies = 15; //Number of copies to make, adjust as you wish
this.swapDepths(1100); //Make sure the original MC is at the 'top of the pile'
if (_name == "pie") { //Only run this code from the original MC, not the dupes
for (i=1; i<numCopies+1; i++) {
duplicateMovieClip ("_root.pie", "dmc"+i, i+1000);
_root["dmc"+i].nm = i; //Holds the # of the MC
_root["dmc"+i].af = 100 /numCopies; //Used to calculate the amount to fade each MC
_root["dmc"+i].fr =1-i; //Used to calculate which frame to go to
_root["dmc"+i].onEnterFrame = function() {
with (this) {
fr++; //Which frame?
if(fr>_totalframes) {fr=1;} //Loop it
gotoAndStop(fr);
_alpha = 100-(af*nm); //Set alpha
}
};
}
}
}
I'm not going to go into detail about how these work, if you understand AS it's fairly clear, and if you don't, go check out
AS: Duplicated Movie Clips
AS: ClipEvents by Inglor
AS: swapDepths by -liam-
AS: Variables by Rantzien
AS: Loops & Conditions by BleeBlap
AS: Maths - Basic by T-H