logoExtra: script.barridos

Descripción: Definición de las transiciones de barrido (junto a las definidas con anterioridad).


A continuación mostramos los apuntes asociados a este extra:

Transiciones: Barridos
Las transiciones que presentamos ahora se caracterizan por presentar tiras horizontales o verticales de las capas.
// Descripción para sindicación:
/*
    [rss]Definición de las transiciones de barrido (junto a las definidas con anterioridad).[/rss]
*/
//<![CDATA[
Array.prototype.caos = function() {
     nn = Math.round(Math.random() * this.length);
     elemento = this[nn];
     for (_i = nn; _i < this.length; _i++)    this[_i] = this[_i + 1];
     this.length--;
     return elemento
}

Array.prototype.mitad = function() {
     nn = parseInt(this.length / 2);
     elemento = this[nn];
     for (_i = nn; _i < this.length; _i++)    this[_i] = this[_i + 1];
     this.length--;
     return elemento
}

Array.prototype.extraer = function(n) {
     elemento = this[n];
     for (_i = n; _i < this.length; _i++)    this[_i] = this[_i + 1];
     this.length--;
     return elemento
}

function objetoTransiciones(l, f, an, al, c, v, b)    {
    this._lapsus_ = l;// milisegundos de la transición
    this._fotogramas_ = f;// número de fotogramas por _lapsus_
    this._escala_ = l / f;
    this._ancho_ = an;// anchura de la zona de transición
    this._alto_ = al;// altura de la zona de transición
    this._capas_ = c;// array con el id de las capas afectadas
    this._visible_ = v;// primera capa visible al inicio. Se actualizará en cada transición...
    this._base_ = b;// contenedor de las capas
    _resguardamos = tag(this._visible_).cloneNode(true);
    tag(this._visible_).parentNode.removeChild(tag(this._visible_))
    tag(this._base_).appendChild(_resguardamos);
    this.id_temp = "objetoTransiciones_" + Math.random() * 1000;
    capa_temp = document.createElement("div");
    capa_temp.style.position = "absolute";
    capa_temp.id = this.id_temp;
    tag(this._base_).appendChild(capa_temp);
    this._acciones_ = [];
    this._tiempos_ = [];

    this._limpiar_ = function()    {
        while (tag(this.id_temp).hasChildNodes())
            tag(this.id_temp).removeChild(tag(this.id_temp).firstChild);
    }

    this.asignar_tiempo = function(x)    {
        this._lapsus_ = x;
        this._escala_ = x / this._fotogramas_;
    }

    this.asignaciones = function(x)    {
        _resguardar = tag(this._visible_).cloneNode(true);
        tag(this._visible_).parentNode.removeChild(tag(this._visible_));
        tag(this._base_).appendChild(_resguardar);

        _resguardar = tag(x).cloneNode(true);
        tag(x).parentNode.removeChild(tag(x));
        tag(this._base_).appendChild(_resguardar);
    }
}

objetoTransiciones.prototype.fundido = function(x)    {
    this._limpiar_()
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.opacity = "0";
        tag(x).style.top = "0";
        tag(x).style.left = "0";
        for (i = this._fotogramas_; i > 0; i--)    {
            accion = "tag('" + x + "').style.opacity = '" + (i / this._fotogramas_) + "'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.dn = function(x)    {
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        _resguardar = tag(this._visible_).cloneNode(true);
        tag(this.id_temp).appendChild(_resguardar);
        _resguardar = tag(x).cloneNode(true);
        _resguardar.style.top = -this._alto_ + "px";
        _resguardar.style.left = "0";
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion = "tag('" + this.id_temp + "').style.top = '" + (this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.ds = function(x)    {
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);
        _resguardar = tag(x).cloneNode(true);
        _resguardar.style.top = this._alto_ + "px";
        _resguardar.style.left = "0";
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = this._fotogramas_; i > 0; i--)    {
            accion = "tag('" + this.id_temp + "').style.top = '" + -(this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype._do = function(x)    {
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);
        _resguardar = tag(x).cloneNode(true);
        _resguardar.style.left = -this._ancho_ + "px";
        _resguardar.style.top = "0";
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.left = "0";
        tag(this.id_temp).style.top = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion = "tag('" + this.id_temp + "').style.left = '" + (this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.de = function(x)    {
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);
        _resguardar = tag(x).cloneNode(true);
        _resguardar.style.left = this._ancho_ + "px";
        _resguardar.style.top = "0";
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.left = "0";
        tag(this.id_temp).style.top = "0";
        for (i = this._fotogramas_; i > 0; i--)    {
            accion = "tag('" + this.id_temp + "').style.left = '" + -(this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.an = function(x)    {// apertura desde el norte
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        _resguardar = tag(this._visible_).cloneNode(true);
        tag(this.id_temp).appendChild(_resguardar);
        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        tag(this.id_temp).style.height = this._alto_ + "px";
        tag(this.id_temp).style.width = this._ancho_ + "px";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion = "tag('" + this.id_temp + "').style.top = '" + -(this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.as = function(x)    {// apertura desde el sur
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);
        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion = "tag('" + this.id_temp + "').style.top = '" + (this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.ao = function(x)    {// apertura desde el oeste
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);

        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion = "tag('" + this.id_temp + "').style.left = '" + -(this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.ae = function(x)    {// apertura desde el este
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);
        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion = "tag('" + this.id_temp + "').style.left = '" + (this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.ano = function(x)    {// apertura desde el norte/oeste
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);

        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion1 = "tag('" + this.id_temp + "').style.top = '" + -(this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + this.id_temp + "').style.left = '" + -(this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.ane = function(x)    {// apertura desde el norte/este
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);

        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion1 = "tag('" + this.id_temp + "').style.top = '" + -(this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + this.id_temp + "').style.left = '" + (this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.aso = function(x)    {// apertura desde el sur/oeste
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);

        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion1 = "tag('" + this.id_temp + "').style.top = '" + (this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + this.id_temp + "').style.left = '" + -(this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.ase = function(x)    {// apertura desde el sur/este
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);

        _resguardar = tag(this._visible_).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
        for (i = 1, total = this._fotogramas_; i <= total; i++)    {
            accion1 = "tag('" + this.id_temp + "').style.top = '" + (this._alto_ * i / this._fotogramas_) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + this.id_temp + "').style.left = '" + (this._ancho_ * i / this._fotogramas_) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.cn = function(x)    {// cierre desde el norte
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.top = -this._alto_ + "px";
        tag(x).style.left = "0";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion = "tag('" + x + "').style.top = '" + -parseInt(this._alto_ - ((i / this._fotogramas_) * this._alto_)) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.cs = function(x)    {// cierre desde el sur
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.top = this._alto_ + "px";
        tag(x).style.left = "0";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion = "tag('" + x + "').style.top = '" + parseInt(this._alto_ - ((i / this._fotogramas_) * this._alto_)) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.co = function(x)    {// cierre desde el oeste
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.left = -this._ancho_ + "px";
        tag(x).style.top = "0";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion = "tag('" + x + "').style.left = '" + -parseInt(this._ancho_ - ((i / this._fotogramas_) * this._ancho_)) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.ce = function(x)    {// apertura desde el este
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.left = this._ancho_ + "px";
        tag(x).style.top = "0";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion = "tag('" + x + "').style.left = '" + parseInt(this._ancho_ - ((i / this._fotogramas_) * this._ancho_)) + "px'";
            setTimeout(accion, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.cno = function(x)    {// cierre desde el norte/oeste
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.top = -this._alto_ + "px";
        tag(x).style.left = -this._ancho_ + "px";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion1 = "tag('" + x + "').style.top = '" + -parseInt(this._alto_ - ((i / this._fotogramas_) * this._alto_)) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + x + "').style.left = '" + -parseInt(this._ancho_ - ((i / this._fotogramas_) * this._ancho_)) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.cne = function(x)    {// cierre desde el norte/este
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.top = -this._alto_ + "px";
        tag(x).style.left = this._ancho_ + "px";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion1 = "tag('" + x + "').style.top = '" + -parseInt(this._alto_ - ((i / this._fotogramas_) * this._alto_)) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + x + "').style.left = '" + parseInt(this._ancho_ - ((i / this._fotogramas_) * this._ancho_)) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.cso = function(x)    {// apertura desde el sur/oeste
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.top = this._alto_ + "px";
        tag(x).style.left = -this._ancho_ + "px";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion1 = "tag('" + x + "').style.top = '" + parseInt(this._alto_ - ((i / this._fotogramas_) * this._alto_)) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + x + "').style.left = '" + -parseInt(this._ancho_ - ((i / this._fotogramas_) * this._ancho_)) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}

objetoTransiciones.prototype.cse = function(x)    {// apertura desde el sur/este
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);
        tag(x).style.top = this._alto_ + "px";
        tag(x).style.left = this._ancho_ + "px";
        for (i = 1; i <= this._fotogramas_; i++)    {
            accion1 = "tag('" + x + "').style.top = '" + parseInt(this._alto_ - ((i / this._fotogramas_) * this._alto_)) + "px'";
            setTimeout(accion1, i * this._escala_);
            accion2 = "tag('" + x + "').style.left = '" + parseInt(this._ancho_ - ((i / this._fotogramas_) * this._ancho_)) + "px'";
            setTimeout(accion2, i * this._escala_);
        }
        this._visible_ = x;
    }
}


objetoTransiciones.prototype.ini_b = function(x)    {// inicio barrido genérico
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.asignaciones(x);

        _resguardar = tag(x).cloneNode(true);
        _resguardar.id = "id_temp2_" + (Math.random() * 1000);
        tag(this.id_temp).appendChild(_resguardar);

        _resguardar = tag(this.id_temp).cloneNode(true);
        tag(this._base_).removeChild(tag(this.id_temp));
        tag(this._base_).appendChild(_resguardar);
        tag(this.id_temp).style.top = "0";
        tag(this.id_temp).style.left = "0";
    }
}

objetoTransiciones.prototype.ini_bh = function(x)    {// inicio barrido horizontal
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.ini_b(x);
        _altura_ = Math.ceil(this._alto_ / this._fotogramas_);
        for (i = 0; i <= this._fotogramas_; i ++)    {
            temp_x = document.createElement("div");
            temp_x.id = "id_temp_x_" + i;
            temp_x.style.position = "absolute";
            temp_x.style.overflow = "hidden";
            temp_x.style.width = this._ancho_ + "px";
            temp_x.style.height = _altura_ + "px";
            temp_x.style.left = "0";
            temp_x.style.top = (i * _altura_) + "px";
            temp = tag(this._visible_).cloneNode(true);
            temp.id = "id_temp_" + i;
            temp.style.top = -(i * _altura_) + "px";
            temp.style.height = this._alto_ + "px";
            temp.style.width = this._ancho_ + "px";
            temp_x.appendChild(temp);
            tag(this._base_).appendChild(temp_x);
            accion = "tag('" + this._base_ + "').removeChild(tag('id_temp_x_" + i + "'))";
            this._acciones_.push(accion);
            this._tiempos_.push(this._escala_ * i);
        }
    }
}

objetoTransiciones.prototype.ini_bv = function(x)    {// inicio barrido vertical
    this._limpiar_();
    if (x == this._visible_)    {
        return;
    }
    else    {
        this.ini_b(x);
        _anchura_ = Math.ceil(this._ancho_ / this._fotogramas_);
        for (i = 0; i <= this._fotogramas_; i ++)    {
            temp_x = document.createElement("div");
            temp_x.id = "id_temp_x_" + i;
            temp_x.style.position = "absolute";
            temp_x.style.overflow = "hidden";
            temp_x.style.height = this._alto_ + "px";
            temp_x.style.width = _anchura_ + "px";
            temp_x.style.top = "0";
            temp_x.style.left = (i * _anchura_) + "px";
            temp = tag(this._visible_).cloneNode(true);
            temp.id = "id_temp_" + i;
            temp.style.left = -(i * _anchura_) + "px";
            temp.style.height = this._alto_ + "px";
            temp.style.width = this._ancho_ + "px";
            temp_x.appendChild(temp);
            tag(this._base_).appendChild(temp_x);
            accion = "tag('" + this._base_ + "').removeChild(tag('id_temp_x_" + i + "'))";
            this._acciones_.push(accion);
            this._tiempos_.push(this._escala_ * i);
        }
    }
}

objetoTransiciones.prototype.bn = function(x)    {// apertura desde el norte
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.pop(), this._tiempos_.pop());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bs = function(x)    {// apertura desde el sur
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.shift(), this._tiempos_.pop());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bo = function(x)    {// apertura desde el oeste
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.pop(), this._tiempos_.pop());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.be = function(x)    {// apertura desde el este
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.shift(), this._tiempos_.pop());
    }
    this._visible_ = x;
}



objetoTransiciones.prototype.bhc = function(x)    {// apertura desde el caos
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.pop(), this._tiempos_.caos());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bzn = function(x)    {// barrido zig-zag norte
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.pop(), this._tiempos_.mitad());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bzs = function(x)    {// barrido zig-zag sur
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.shift(), this._tiempos_.mitad());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bdn = function(x)    {// barrido doble norte
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            (this._acciones_.length % 2 == 1) ? this._acciones_.mitad() : this._acciones_.shift(), this._tiempos_.shift()
        )
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bds = function(x)    {// barrido doble sur
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            (this._acciones_.length % 2 == 1) ? this._acciones_.mitad() : this._acciones_.shift(), this._tiempos_.pop()
        )
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.brn = function(x)    {// barrido repe norte
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            this._acciones_.pop(), (this._tiempos_.length % 2 == 0) ? this._tiempos_.mitad() : this._tiempos_.pop()
        )
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.brs = function(x)    {// barrido repe sur
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            this._acciones_.shift(), (this._tiempos_.length % 2 == 0) ? this._tiempos_.mitad() : this._tiempos_.pop()
        )
    }
    this._visible_ = x;
}


objetoTransiciones.prototype.bch = function(x)    {// cierre horizontal
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            (this._acciones_.length % 2 == 1) ? this._acciones_.pop() : this._acciones_.shift(),
            (this._tiempos_.length % 2 == 1) ? this._tiempos_.shift() : this._tiempos_.shift()
        )
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bah = function(x)    {// apertura horizontal
    this.ini_bh(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            (this._acciones_.length % 2 == 1) ? this._acciones_.pop() : this._acciones_.shift(),
            (this._tiempos_.length % 2 == 1) ? this._tiempos_.pop() : this._tiempos_.pop()
        )
    }
    this._visible_ = x;
}


objetoTransiciones.prototype.bvc = function(x)    {// apertura desde el caos
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.pop(), this._tiempos_.caos());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bze = function(x)    {// zig-zag este
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.shift(), this._tiempos_.mitad());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bzo = function(x)    {// zig-zag oeste
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(this._acciones_.pop(), this._tiempos_.mitad());
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bre = function(x)    {// barrido repe este
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            this._acciones_.shift(), (this._tiempos_.length % 2 == 0) ? this._tiempos_.mitad() : this._tiempos_.pop()
        )
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bro = function(x)    {// barrido repe oeste
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            this._acciones_.pop(), (this._tiempos_.length % 2 == 0) ? this._tiempos_.mitad() : this._tiempos_.pop()
        )
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bdo = function(x)    {// barrido doble oeste
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            (this._acciones_.length % 2 == 1) ? this._acciones_.mitad() : this._acciones_.shift(), this._tiempos_.shift()
        )
    }
    this._visible_ = x;
}

objetoTransiciones.prototype.bde = function(x)    {// barrido doble este
    this.ini_bv(x);
    while(this._acciones_.length > 0)    {
        setTimeout(
            (this._acciones_.length % 2 == 1) ? this._acciones_.mitad() : this._acciones_.shift(), this._tiempos_.pop()
        )
    }
    this._visible_ = x;
}



var _efectos_;
var _efecto_actual_ = 0;
var _capas_ = ["capa_1", "capa_2", "capa_3"];
resguardamos_transiciones_barrido = window.onload;
window.onload = function()    {
    _efectos_ = new objetoTransiciones(1000, 100, 480, 360, _capas_, "capa_1", "capas");
    poner_evento(tag("boton_f"), "click", function(x){_efectos_.fundido(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_dn"), "click", function(x){_efectos_.dn(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_ds"), "click", function(x){_efectos_.ds(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_de"), "click", function(x){_efectos_.de(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_do"), "click", function(x){_efectos_._do(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_an"), "click", function(x){_efectos_.an(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_as"), "click", function(x){_efectos_.as(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_ae"), "click", function(x){_efectos_.ae(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_ao"), "click", function(x){_efectos_.ao(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_ano"), "click", function(x){_efectos_.ano(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_ane"), "click", function(x){_efectos_.ane(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_ase"), "click", function(x){_efectos_.ase(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_aso"), "click", function(x){_efectos_.aso(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_cn"), "click", function(x){_efectos_.cn(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_cs"), "click", function(x){_efectos_.cs(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_ce"), "click", function(x){_efectos_.ce(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_co"), "click", function(x){_efectos_.co(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_cno"), "click", function(x){_efectos_.cno(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_cne"), "click", function(x){_efectos_.cne(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_cse"), "click", function(x){_efectos_.cse(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_cso"), "click", function(x){_efectos_.cso(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_bn"), "click", function(x){_efectos_.bn(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_bs"), "click", function(x){_efectos_.bs(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_bo"), "click", function(x){_efectos_.bo(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_be"), "click", function(x){_efectos_.be(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_bhc"), "click", function(x){_efectos_.bhc(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_bzn"), "click", function(x){_efectos_.bzn(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_bzs"), "click", function(x){_efectos_.bzs(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_brn"), "click", function(x){_efectos_.brn(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_brs"), "click", function(x){_efectos_.brs(_capas_[++_efecto_actual_ % _capas_.length])});



    poner_evento(tag("boton_bdn"), "click", function(x){_efectos_.bdn(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_bds"), "click", function(x){_efectos_.bds(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_bvc"), "click", function(x){_efectos_.bvc(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_bze"), "click", function(x){_efectos_.bze(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_bzo"), "click", function(x){_efectos_.bzo(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_bre"), "click", function(x){_efectos_.bre(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_bro"), "click", function(x){_efectos_.bro(_capas_[++_efecto_actual_ % _capas_.length])});

    poner_evento(tag("boton_bde"), "click", function(x){_efectos_.bde(_capas_[++_efecto_actual_ % _capas_.length])});
    poner_evento(tag("boton_bdo"), "click", function(x){_efectos_.bdo(_capas_[++_efecto_actual_ % _capas_.length])});

    //poner_evento(tag("boton_bah"), "click", function(x){_efectos_.bah(_capas_[++_efecto_actual_ % _capas_.length])});
    //poner_evento(tag("boton_bch"), "click", function(x){_efectos_.bch(_capas_[++_efecto_actual_ % _capas_.length])});

    if (resguardamos_transiciones_barrido != undefined)
        resguardamos_transiciones_barrido();
}
//]]>

Este código ha sido leído en 100 ocasiones.

Zona de comentarios

Esta extra aún no tiene comentarios.

Evaluación

Valoración de esta página: (extra.script.barridos) valor

Valoración evaluar evaluar evaluar evaluar evaluar evaluar evaluar evaluar evaluar evaluar

Respuesta: Zona de mensajes (proceso de evaluación)

Listados: imágenes, categorías, etiquetas, extras | Anuarios: 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 | Otros enlaces: buscador