Buenas, tengo un problemilla y la verdad no entiendo que est� pasando:
Supongamos que estoy haciendo un libro, donde en la pelicula principal 
tengo atachadas 3 movie-clips con contenido. Mediante unos botones voy 
llamando a 2 funciones;
Este es el c�digo principal:

var numpag=4;
prof = 1;
var i = 1;
var actual=0;
_root.attachMovie("hoja", "hoja"+i, prof);
_root["hoja"+i]._x = 94;
_root["hoja"+i]._y = 57;
j = 0;
function adelante() {
        if (j<numpag) {
                posX = 94;
                posY = 57;
                prof = prof+1;
                j = i+1;
                _root.attachMovie("hoja"+j, "hoja"+j, prof);
                _root["hoja"+j]._x = posX;
                _root["hoja"+j]._y = posY;
                nivel=_root["hoja"+j].getDepth();
                trace("nivel = "+nivel);
                _root["hoja"+i].swapDepths(prof);
                _root["hoja"+i].gotoAndPlay(1);
                i++;
                actual=j;
                
        }
}
function atras() {
        if (j>1) {
                prof = prof+1;
                j = i-1;
                _root["hoja"+j].swapDepths(prof);
                nivel=_root["hoja"+j].getDepth();
                trace("nivel= "+nivel);
                _root["hoja"+j].gotoAndPlay(7);
                i--;
                actual = j;
                //trace(actual);
        }
}

Bien, si lanzo la animaci�n, voy pasando las hojas con la funcion 
adelante(). Llego al final de las hojas, y ok. Luego paso hojas hacia 
atr�s con la funci�n atr�s(), y ok. Ahora bien, cuando vuelvo a llamar 
a la funci�n adelante(), empieza a fallar todo el tinglado.
Por lo que veo es problema de niveles de profundidad, pero no s� como 
evitar el problema.
Alguna idea? 
No s� si me he explicado bien.

Un saludo.

David Serrano


<!-------------------------------
Lista ASNativos:
subscripciones/desubscripciones
http://www.sidedev.net/asnativos
-------------------------------->

Responder a