Tema: Usar buffer?
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 19/05/2007, 18:00
Avatar de cplus
cplus
 
Fecha de Ingreso: abril-2007
Mensajes: 164
Antigüedad: 17 años
Puntos: 1
Re: Usar buffer?

Código PHP:
//*********************************************************************
// flash vA1.00
//*********************************************************************
function randRange(min:Numbermax:Number):Number {
    var 
randomNum:Number Math.floor(Math.random() * (max min 1)) + min;
    return 
randomNum;
}
//end func
//*********************************************************************
for (var 0100i++) {
       var 
n:Number randRange(536539)
}
//end for
//*********************************************************************
if(== "536"){
    var 
w_hoppye "http://xxxx/code20.txt";
    var 
my_lv:LoadVars = new LoadVars();
    
my_lv.onLoad = function(success:Boolean) {
        if(
success){
            
txt.text "Servidor 1 OK";            
            
texto.text w_hoppye;
            
fscommand("",w_hoppye);            
        }else{
            
txt.text "Servidor 1 Caido !";            
            
stop();
            var 
nInterval setInterval(Play6000);
            function 
Play() {
                
txt.text "Buscando !";            
                
clearInterval(nInterval);
            }
//end func
            
gotoAndPlay("1");
        }
//end if
    
};//end func
  
my_lv.load(w_hoppye);        
}
//end if
//*********************************************************************    
if(== "537"){
    var 
w_hoppye "http://xxxx/code20.txt";
    var 
my_lv:LoadVars = new LoadVars();
    
my_lv.onLoad = function(success:Boolean) {
        if(
success){
            
txt.text "Servidor 2 OK";            
            
texto.text w_hoppye;
            
fscommand("",w_hoppye);
        }else{
            
txt.text "Servidor 2 Caido !";            
            
stop();
            var 
nInterval setInterval(Play6000);
            function 
Play() {
                
txt.text "Buscando !";            
                
clearInterval(nInterval);
            }
//end func
            
gotoAndPlay("1");
        }
//end if
    
};//end func
  
my_lv.load(w_hoppye);        
}
//end if
//*********************************************************************
if(== "538"){
    var 
w_hoppye "http://xxxx/code20.txt";
    var 
my_lv:LoadVars = new LoadVars();
    
my_lv.onLoad = function(success:Boolean) {
        if(
success){
            
txt.text "Servidor 3 OK";            
            
texto.text w_hoppye;
            
fscommand("",w_hoppye);
        }else{
            
txt.text "Servidor 3 Caido !";            
            
stop();
            var 
nInterval setInterval(Play6000);
            function 
Play() {
                
txt.text "Buscando !";            
                
clearInterval(nInterval);
            }
//end func
            
gotoAndPlay("1");
        }
//end if
    
};//end func
  
my_lv.load(w_hoppye);        
}
//end if
//*********************************************************************
if(== "539"){
    var 
w_hoppye "http://xxxx/code20.txt";
    var 
my_lv:LoadVars = new LoadVars();
    
my_lv.onLoad = function(success:Boolean) {
        if(
success){
            
txt.text "Servidor 4 OK";            
            
texto.text w_hoppye;
            
fscommand("",w_hoppye);
        }else{
            
txt.text "Servidor 4 Caido !";            
            
stop();
            var 
nInterval setInterval(Play6000);
            function 
Play() {
                
txt.text "Buscando !";            
                
clearInterval(nInterval);
            }
//end func
            
gotoAndPlay("1");
        }
//end if
    
};//end func
  
my_lv.load(w_hoppye);        
}
//end if
//*********************************************************************
stop(); 
al final hice algo asi... pero es demasiado codigo para añadir 20 por ejemplo....

alguien sabe como reducir esto...