Would anyone be interested is a little Actionscript battle? I was thinking about mouse trailers because they are easy to make and you can get some really nice effects.
Tweens would be allowed, but no imported graphics or things like that…
If some of you are interested but need a script to get started, I (or anyone else) can provide a quick tute on mouse trailers.
I hope some of the mods will be interested too, I know we have a few masters… (Dan, Thor :bad: )
Next step: we add an enterFrame to the created clips
function fadeOut(){
this._alpha -= 5;
if (this._alpha < 10){
this.removeMovieClip();
}
}
this.onEnterFrame = function(){
i++;
var mc = this.attachMovie("theClip","theClip"+i,i);
mc._x = _xmouse;
mc._y = _ymouse;
mc.onEnterFrame = fadeOut;
}
You can do pretty much anything you want in that function.
The next step would be attaching the clip at another position that the mouse position, making the clips react to each other…
because the clip’s enterFrame is fadeout, it will end up removing itself after a couple of frames and you wont have to worry about it clogging up the system - clips get removed at the same rate they are added so you get an equilibrium
who needs to keep duplicating movieclips when you can have a set amount with the ilusion of fading… try this:
[AS]numMCs = 100; //the number of movie clips that will trail
speed = 1.1; //the speed at which the movie clips will follow the mouse
for (i=1; i<=numMCs; ++i) { //starts a for loop
MC = “MC”+i; //MC is a variable that stores the names of all the new movie clips
//MC is updated every loop
_root.attachMovie(“MCID”, MC, i); //attaches a movie clip from the library with the linkage name “MCID”
_root[MC]._alpha = (100/numMCs)*(numMCs-i+1); //adjusts each MC’s alpha. if you’re going to use 100 MC’s the
//just use 'MC._alpha = 100-(i+1). the original code spreads out
//alpha throughout the MC no matter how many you have
} //ends the for loop
onEnterFrame = function () { //starts an onEnterFrame function
for (i=1; i<=numMCs; ++i) { //starts a for loop
MC = “MC”+i; //stores the names of all the new movie clips
if (i == 1) { //checks if i is equal to 1
_root[MC]._x = _xmouse; //if i = 1 then the loop is on the first loop and on the first MC
_root[MC]._y = _ymouse; //this means the first MC has to follow the mouse
} else { //if the above if statement is not satisfied, then do the following actions
MCb = “MC”+(i-1); //MCb stores the name of the MC that’s ahead of it
_root[MC]._x -= (_root[MC]._x-_root[MCb]._x)/speed; //the current MC eases towards the MC that’s
_root[MC]._y -= (_root[MC]._y-_root[MCb]._y)/speed; //ahead of it
} //closes the if statement
} //declares the end of the for loop
}; //declares the end of the onEnterFrame function[/AS]