Tema: [AS Battle]
Ver Mensaje Individual
  #15 (permalink)  
Antiguo 29/10/2005, 21:53
Avatar de stock
stock
 
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 19 años, 10 meses
Puntos: 53
Va mi contragolpe!!

100 Fotogramas por Segundo

Código PHP:
/* By Crysfel Villa
 * Octubre 28, 2005
 */

var cont:MovieClip;
var 
barra:MovieClip;
var 
form:TextFormat;
var 
n:Number 5;
    
dibujarBarra(Stage.width/2,Stage.height-25);
crearMsgs();
iniciar();

function 
iniciar():Void{
    
Mouse.hide();
    var 
dirx:Number Math.floor(Math.random()*2);
    var 
diry:Number 0;
    var 
x:Number 0;
    var 
y:Number 0;
    var 
a:Number 2;
    
5;
    
cont undefined;
    
cont this.createEmptyMovieClip("c"0);
    
cont._x Stage.width/2;
    
cont._y Stage.height/2;

    
cont.onEnterFrame = function():Void  {
        
barra._x _root._xmouse;
        
this._rotation -= 5;
        if (
a<74) {
            
a++;
            
80*Math.sin(a*42);
            
80*Math.cos(a*42);
            if (
a<20) {
                
cont.moveTo(xy);
            }
            
cont.lineStyle(0.50x99999960);
            
cont.lineTo(xy);
        } else {
            if (
a++<200) {
                
a++;
                
40*Math.sin(a*-15);
                
40*Math.cos(a*-15);
                if (
bol) {
                    
cont.lineStyle(10x99999940);
                } else {
                    
cont.lineStyle(10x99999940);
                }
                
cont.curveTo(x*0.5y*0.500);
                
cont.lineTo(xy);
            } else if (
a<275) {
                
texto.text "Imagen Completa...";
                
texto.setTextFormat(form);
            }
        }
        if (
a>=275) {
            
texto.text "Listo para jugar!!";
            
texto.setTextFormat(form);
            
this._xscale -= 1;
            
this._yscale this._xscale;
            if (
this._xscale<=30) {
                
cont.onEnterFrame = function() {
                    
barra._x _root._xmouse;
                    if (
dirx == 1) {
                        
cont._x += Math.floor(Math.random()*5);
                    } else {
                        
cont._x -= 10 Math.floor(Math.random()*5);
                    }
                    if (
diry == 1) {
                        
cont._y += 5+Math.floor(Math.random()*5);
                    } else {
                        
cont._y -= +Math.floor(Math.random()*5);
                    }
                    if (
cont._x>=Stage.width-25) {
                        
disparar(cont.duplicateMovieClip("disparo"+nn));
                        
n++;
                        
dirx 0;
                    }
                    if (
cont._y>=Stage.height-45) {
                        if(
cont._x barra._x && cont._x barra._x+barra._width){
                            
diry 0;
                        }else if(
cont._y Stage.height+30){
                            
texto.text "Sorry, has perdido, Presiona Barra Espaciadora";
                            
texto.setTextFormat(form);
                            
delete this.onEnterFrame;
                        }
                        
                    }
                    if (
cont._x<=25) {
                        
disparar(cont.duplicateMovieClip("disparo"+nn));
                        
n++;
                        
dirx 1;
                    }
                    if (
cont._y<=25) {
                        
disparar(cont.duplicateMovieClip("disparo"+nn));
                        
n++;
                        
diry 1;
                    }
                }
            }
        }
    }
}
function 
disparar(mc:MovieClip):Void {
    var 
color:Color = new Color("disparo"+n);
    
mc.onEnterFrame = function():Void  {
        
this._xscale += 10;
        
this._yscale this._xscale;
        
this._alpha -= 10;
        
color.setRGB(random(0xfff63));
        if (
this._alpha<40) {
            
this.removeMovieClip();
        }
    }
}
function 
dibujarBarra(x:Number,y:Number):Void {
    
barra this.createEmptyMovieClip("c"1);
    
barra.beginFill(0x918EAC100);
    
barra.moveTo(-500);
    
barra.lineTo(500);
    
barra.lineTo(5020);
    
barra.lineTo(-5020);
    
barra.lineTo(-500);
    
barra.endFill();
    
barra._x x;
    
barra._y y
}

function 
crearMsgs():Void{
    
this.createTextField("texto"2Stage.width/2-80Stage.height/2+80300100);
    
form = new TextFormat();
    
form.font "arial";
    
form.size 10;
    
form.color 0x006699;
    
form.align "center";
    
texto.text "Formando imagen, espera...";
    
texto.setTextFormat(form);
    
texto._x Stage.width/texto._width/2;
    
texto._y 20;
}

var 
myListener:Object = new Object();
Key.addListener(myListener);

myListener.onKeyUp = function () {
    if(
Key.getAscii()==Key.SPACE){
        
iniciar();
    }

porcierto Julio, estubo muy bueno tu ultimo tiro, realmente me costo trabajo pensar como contratacar

Felicidades!! ya quiero ver el proximo contrataque

have funnnnnnnnnnn