Ver Mensaje Individual
  #16 (permalink)  
Antiguo 24/07/2007, 15:54
Diego.
 
Fecha de Ingreso: julio-2007
Mensajes: 68
Antigüedad: 16 años, 9 meses
Puntos: 3
Re: Código de player 6 no funcionaa en 8

prueba asi:

Código:
var j:Number = 0;
var i:Number = 0;

var maximo:Boolean = false;
var primera:Boolean = true;
this.onEnterFrame = function() {
	j++;
	trace(j);

	j == 100 ? j=0 : null;
	if (j%2 == 0) {
		i>50 ? i=0 : null;
		i++;

		attachMovie("circle","squ_"+i,i);
		var ref:MovieClip = _root["squ_"+i];
		ref._alpha = 0;
		ref.onEnterFrame = function() {
			if (this.primera != true) {
				this.maximo = false;
				this.primera = true;
				this.posx = Math.random()*550;
				this.posy = Math.random()*400;
				this._x = 275;
				this._y = 200;
				this._xscale = 1;
				this._yscale = 1;
				this.velx = Math.random()*50;
				this.vely = Math.random()*50;
			}
			if (this.maximo == true) {
				this._alpha -= 5;
				this._xscale -= 5;
				this._yscale -= 5;
				if (this._alpha<=0) {
					this.onEnterFrame = null;
					this.removeMovieClip();
				}
			}
			if (this.maximo == false) {
				this._alpha += 5;
				this._xscale += 2;
				this._yscale += 2;
				if (this._alpha>=100) {
					this.maximo = true;
				}
			}
			this._x += (this._x-this.posx)/this.velx;
			this._y += (this._y-this.posy)/this.vely;
		};
	}
};