//variables
var nSpace = 7;
var xStart = _root._xmouse;
var yStart = _root._ymouse;
var nText = “Kirupa.com”;
var nFriction = 3;
//creates the trailer
for (ii = 0; ii < length (nText); ii++) {
//attach Movies from Library
attachMovie (‘mcLetter’, ‘copy’ + ii, 100 - ii);
ext = _root[‘copy’ + ii];
//Use substr to call the text from the string
ext.mcText = nText.substr (ii, 1);
}
_root.onEnterFrame = function () {
//For Loop to move the balls
for (ii = 0; ii < length (nText); ii++) {
//Defines ext and prt. Makes Code easier to write.
ext = _root[‘copy’ + ii];
prt = _root[‘copy’ + (ii - 1)];
nDist = Math.abs (prt._y - ext._y);
//checks the extetion _root.copy(ii)
//then tells them what to do.
if (ii == 0) {
//to do Alpha with the first you must target it specifically
//because it does not have a cooresponding PRT MC
ext._alpha = 1000 / (Math.abs (_root._ymouse - ext._y) + 1);
ext._x += (_root._xmouse - ext._x) / nFriction + nSpace;
ext._y += (_root._ymouse - ext._y) / nFriction;
} else {
ext._x += (prt._x - ext._x) / nFriction + nSpace;
ext._y += (prt._y - ext._y) / nFriction;
ext._alpha = 1000 / (nDist + 1);
}
}
};
whats this variable does in this code:
var nSpace = 7;
var nFriction = 3;