Tema: [AS Battle]
Ver Mensaje Individual
  #9 (permalink)  
Antiguo 14/10/2005, 06:15
plotz!
 
Fecha de Ingreso: julio-2004
Mensajes: 71
Antigüedad: 19 años, 9 meses
Puntos: 0
muevete para aya....

NO!, va para el otro lado...


presiona, presiona!!!!!


Código:
comenzar(1);
function comenzar(n:Number):Void {
	var contText:MovieClip = this.createEmptyMovieClip("contText", this.getNextHighestDepth());
	var contText:TextField = contText.createTextField("contText", 0, 0, 0, 360, 20);
	var cont:MovieClip = this.createEmptyMovieClip("c", n);
	var x:Number = 0;
	var y:Number = 0;
	var a:Number = 0;
	//cont._alpha = 0;
	cont._x = Stage.width/2;
	cont._y = Stage.height/2;
	contText._x = (Stage.width/2)-(contText._width/2);
	contText._y = (Stage.height/2)+100;
	cont.onEnterFrame = function() {
		this._rotation += 15;
		if (a<80) {
			a += 1.5;
			x = 40*Math.sin(a*3.5);
			y = 40*Math.cos(a*3.5);
			if (a<2) {
				cont.moveTo(x, y);
			}
			cont.lineStyle(1, 0x0066cc, 20);
			cont.lineTo(x, y);
		} else {
			if (a<151) {
				a++;
				x = 60*Math.sin(a*2.5);
				y = 60*Math.cos(a*2.5);
				if (a%2 == 0) {
					cont.lineStyle(3, 0xFDCA02, 20);
				} else {
					cont.lineStyle(3, 0xFF00FF, 20);
				}
				cont.lineTo(x, y);
			} else {
				this._alpha -= 10;
				if (this._xscale<150) {
					this._xscale += 10;
					this._yscale += 10;
				} else {
					contText.text = "muevete presionando LEFT o DOWN (con SPACE te detienes / centras)";
					if (pos == 0) {
						if (this._x<(Stage.width-30)) {
							this._x += 30;
						} else if (this._x>(Stage.width-30)) {
							this._x = -Stage.width;
						}
					}
					if (pos == 1) {
						if (this._y<(Stage.height-30)) {
							this._y += 30;
						} else if (this._y>(Stage.height-30)) {
							this._y = -Stage.height;
						}
					}
					if (pos == 2) {
						this._x = Stage.width/2;
						this._y = Stage.height/2;
					}
				}
				if (this._alpha<2) {
					this._alpha = 100;
				}
			}
		}
	};
}
var presionaTecla:Object = new Object();
presionaTecla.onKeyDown = function() {
	if (Key.isDown(Key.DOWN)) {
		pos = 1;
		contText._visible = false;
	}
	if (Key.isDown(Key.RIGHT)) {
		pos = 0;
		contText._visible = false;
	}
	if (Key.isDown(Key.SPACE)) {
		pos = 2;
		contText._visible = true;
	}
};
Key.addListener(presionaTecla);

Última edición por plotz!; 14/10/2005 a las 06:22