mira haber si te funciona esto. de todas maneras, si casilla1,casilla2...etc son variables, mejor seria que usases un array. Te funcionara mas optimamente.
 
 
var total=6 // total de clips que quieres rotar en el if
 
for (x=1;x<=total;x++){
    obj = eval("_root.objetivo"+x);
    if ((this._x==obj._x) && (this._y==obj._y)){
        obj2=eval("_root.casilla"+x);
        obj2=false;
        }
    }
 
 
DDT
 
       <% Joseba Alonso Perez %>
        <% Desarrollador  web %>
       <% www.inproweb.com %>
----- Original Message -----
Sent: Monday, July 02, 2001 8:26 AM
Subject: [flashmaestro] varias sentencias IF

Mi duda es sencilla, �como podria sustituir esta lista de sentencias por un for o por un while (tengo problemillas con la sint�xis que no se resolver)?   
 
    if ((this._x)==(_root.objetivo1._x) and (this._y)==(_root.objetivo1._y)) {
        _root.casilla1 = false;
    }
    if ((this._x)==(_root.objetivo2._x) and (this._y)==(_root.objetivo2._y)) {
        _root.casilla2 = false;
    }
    if ((this._x)==(_root.objetivo3._x) and (this._y)==(_root.objetivo3._y)) {
        _root.casilla3 = false;
    }
    if ((this._x)==(_root.objetivo4._x) and (this._y)==(_root.objetivo4._y)) {
        _root.casilla4 = false;
    }
    if ((this._x)==(_root.objetivo5._x) and (this._y)==(_root.objetivo5._y)) {
        _root.casilla5 = false;
    }
    if ((this._x)==(_root.objetivo6._x) and (this._y)==(_root.objetivo6._y)) {
        _root.casilla6 = false;
    }
                                                        Gracias..

Responder a