Tema: [AS Battle]
Ver Mensaje Individual
  #13 (permalink)  
Antiguo 17/10/2005, 23:20
Avatar de stock
stock
 
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 19 años, 9 meses
Puntos: 53
Mis segundo disparo!! espero les agrade!!

es importante poner 100 fotogramas por segundo

Código PHP:
var cont:MovieClip this.createEmptyMovieClip("c"0);
var 
x:Number 0;
var 
y:Number 0;
var 
a:Number 2;
var 
n:Number 5;
var 
bol:Boolean true;
var 
listener:Object = new Object();
Mouse.addListener(listener);

this.createTextField("texto"1Stage.width/2-80Stage.height/2+80300100);
var 
form:TextFormat = new TextFormat();
form.font "arial";
form.size 10;
form.color 0x666666;
texto.text "Formando imagen, espera...";
texto.setTextFormat(form);
cont._x Stage.width/2;
cont._y Stage.height/2;

cont.onEnterFrame = function():Void {
    
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);
                
bol false;
            } else {
                
cont.lineStyle(10x99999940);
                
bol true;
            }
            
cont.curveTo(x*0.5y*0.500);
            
cont.lineTo(xy);
        }else if(
350){
            
texto.text "Imagen Completa...";
            
texto.setTextFormat(form);
        }
    }
    if(
a>=350){
        if(
this._xscale>30){
            
Mouse.hide();
            
texto.text "Click donde quieras!!";
            
texto.setTextFormat(form);
            
this._xscale this._xscale-2;
            
this._yscale this._xscale;
        }
    }
}

listener.onMouseMove = function():Void{
    if(
a>400){
        
cont._x _xmouse;
        
cont._y _ymouse;
    }
}

listener.onMouseDown = function():Void{
    if(
a>400){
        
disparar(cont.duplicateMovieClip("disparo"+n,n));
        
n++;
    }
}

function 
disparar(mc:MovieClip):Void{
    var 
d:Number 0.5;
    var 
asig:Boolean false;
    var 
dir:Number;
    
dir Math.floor(Math.random()*4) + 1;
    
mc.onEnterFrame = function():Void{
        
this._rotation += 5;
        
this._xscale-=5;
        
d*1.2;
        switch(
dir){
            case 
:  this._x += d;
                      
this._y += d;
                      break;
            case 
:  this._x -= d;
                      
this._y -= d;
                      break;
            case 
:  this._x -= d;
                      
this._y += d;
                      
asig true;
                      break;
            case 
:  this._x += d;
                      
this._y -= d;
                      
asig true;
                      break;
        }
        
        if(
this._x Stage.width || this._y Stage.height || this._y || this._x 0){
            
this.removeMovieClip();
        }
    }    

have funnnnnnn

Última edición por stock; 28/10/2005 a las 13:02