mcN = "letter";

loop = 0;
loopDelay = 0;
waitCharEnd = 0;

aLetters = new Array();

for (i = 0; i< numChar; i++){
  aLetters[i+0] = i;
  var letter =  this[mcN +i];
  letter._visible = true;
  letter.init = letterInit;
  letter.doEffect = effect;
  letter.number = i;
}


function letterInit(){
  this.initX = this._x;
  this.initY = this._y;
  this.scaleX = this._parent.scaleX;
  this.scaley = this._parent.scaleY;
  this.posX = this._parent.posX;
  this.posY = this._parent.posY;
}

function effect(){
  this._x = this.initX + Math.floor(Math.random() * (this.posX *2)) - this.posX;
  this._y = this.initY + Math.floor(Math.random() * (this.posY*2)) - this.posY;
  this._xscale = 100 + Math.floor(Math.random() * this.scaleX*2) - this.scaleX;
  this._yscale = 100 + Math.floor(Math.random() * this.scaleY*2) - this.scaleY;
}

function shuffle(){
  return Math.floor(Math.random() * 3) -1;
}
if (random == 1){
  aLetters.sort(shuffle);
}

if (reverse == 1){
  aLetters.reverse();
}