Visualizzazione dei risultati da 1 a 5 su 5

Discussione: vslide di Julis design

  1. #1
    Utente di HTML.it L'avatar di albe66
    Registrato dal
    Sep 2000
    Messaggi
    274

    vslide di Julis design

    ciao raga, rieccomi sul pezzo per chiedere il vs aiuto.
    ho scaricato la galleria vslide di julius e avrei la necessità di apportare una modifica.
    in pratica, quando vado con la manina sulle miniature, vorrei che queste si fermassero.

    riporto il codice:


    larghezzamovie = Stage.height;
    posSin = 1;
    vel = -1;
    dimImm = 78;
    selezione._x = 10;
    letto = false;
    pos_iniziale = Stage.width-dimImm;
    _root.mc_desc.sf_desc._width = pos_iniziale;
    leggi = function () {
    nuovo = new XML();
    nuovo.ignoreWhite = true;
    nuovo.load("file.xml");
    nuovo.onLoad = function(success) {
    if (success) {
    nfoto = this.childNodes.length;
    posDes = nfoto;
    for (i=0; i<nfoto; i++) {
    _root.attachMovie("mc", "mc"+(i+1), i+1);
    _root["mc"+(i+1)]._y = dimImm*i;
    //altezza tra una miniatura e l'altra
    _root["mc"+(i+1)]._x = 524;
    //posizione x della barra
    _root["mc"+(i+1)].big = this.childNodes[i].attributes.photo_big;
    _root["mc"+(i+1)].desc = this.childNodes[i].attributes.descrizione;
    _root["mc"+(i+1)].contenitore.loadMovie(this.childNodes[i].attributes.photo);
    _root["mc"+(i+1)]._alpha = 50;
    _root.box.clip_mc.loadMovie(this.childNodes[0].attributes.photo_big);
    _root.pre.loadMovie(this.childNodes[i].attributes.photo_big);
    _root.image = this.childNodes[0].attributes.photo_big;
    _root.mc_desc.descrizione.text = this.childNodes[0].attributes.descrizione;
    _root["mc"+(i+1)].onRelease = released;
    _root["mc"+(i+1)].onRollOver = rollover;
    _root["mc"+(i+1)].onRollOut = rollout;
    _root["mc"+(i+1)].onReleaseOutside = rollout;
    }
    letto = true;
    } else {
    _root.didascalia.text = "errore di lettura";
    }
    };
    };
    leggi();
    _root.onMouseMove = function() {
    x = _root._xmouse;
    y = _root._ymouse;
    if (x>pos_iniziale) {
    if (y>0 && y<60) {
    vel = -(Math.round((y-(larghezzamovie/2))/10));
    }
    if (y>260 && y<larghezzamovie) {
    vel = -(Math.round((y-(larghezzamovie/2))/10));
    }
    } else {
    if (vel>-1) {
    vel = 1;
    } else {
    vel = -1;
    }
    }
    };
    function released() {
    _root.image = this.big;
    _root.box.play();
    _root.box.clip_mc.loadMovie(_root.image);
    _root.mc_desc.descrizione.text = this.desc;
    //_root.selezione._y = (larghezzamovie)/2;
    //_root.didascalia.text = this.etichetta.text;
    //getURL(percorso,"_blank")
    }
    function rollover() {
    this._alpha = 100;
    }
    function rollout() {
    this._alpha = 50;
    }
    _root.onEnterFrame = function() {
    if (letto) {
    for (i=1; i<=nfoto; i++) {
    _root["mc"+i]._y += vel;
    }
    if (vel>0 && _root["mc"+posSin]._y>0) {
    _root["mc"+posDes]._y = _root["mc"+posSin]._y-dimImm;
    posSin = posDes;
    posDes--;
    if (posDes == 0) {
    posDes = nfoto;
    }
    }
    if (vel<0 && _root["mc"+posSin]._y<=-dimImm) {
    _root["mc"+posSin]._y = _root["mc"+posDes]._y+dimImm;
    posDes = posSin;
    posSin++;
    if (posSin>nfoto) {
    posSin = 1;
    }
    }
    }
    };


    la galleria la potete vedere qui:
    http://www.juliusdesign.net/wp-conte...de_gallery.htm


    grazie a tutti.

    PS. pensavo bastasse inserirre nella function rollover e rollout uno stop e un play ma....non è così semplice.

  2. #2
    prova così

    codice:
    arghezzamovie = Stage.height;
    posSin = 1;
    vel = -1;
    dimImm = 78;
    selezione._x = 10;
    letto = false;
    pos_iniziale = Stage.width-dimImm;
    _root.mc_desc.sf_desc._width = pos_iniziale;
    leggi = function () {
    nuovo = new XML();
    nuovo.ignoreWhite = true;
    nuovo.load("file.xml");
    nuovo.onLoad = function(success) {
    if (success) {
    nfoto = this.childNodes.length;
    posDes = nfoto;
    for (i=0; i<nfoto; i++) {
    _root.attachMovie("mc", "mc"+(i+1), i+1);
    _root["mc"+(i+1)]._y = dimImm*i;
    //altezza tra una miniatura e l'altra
    _root["mc"+(i+1)]._x = 524;
    //posizione x della barra
    _root["mc"+(i+1)].big = this.childNodes[i].attributes.photo_big;
    _root["mc"+(i+1)].desc = this.childNodes[i].attributes.descrizione;
    _root["mc"+(i+1)].contenitore.loadMovie(this.childNodes[i].attributes.photo);
    _root["mc"+(i+1)]._alpha = 50;
    _root.box.clip_mc.loadMovie(this.childNodes[0].attributes.photo_big);
    _root.pre.loadMovie(this.childNodes[i].attributes.photo_big);
    _root.image = this.childNodes[0].attributes.photo_big;
    _root.mc_desc.descrizione.text = this.childNodes[0].attributes.descrizione;
    _root["mc"+(i+1)].onRelease = released;
    _root["mc"+(i+1)].onRollOver = rollover;
    _root["mc"+(i+1)].onRollOut = rollout;
    _root["mc"+(i+1)].onReleaseOutside = rollout;
    }
    letto = true;
    } else {
    _root.didascalia.text = "errore di lettura";
    }
    };
    };
    leggi();
    _root.onMouseMove = function() {
    if (!_global.blocca){
    x = _root._xmouse;
    y = _root._ymouse;
    if (x>pos_iniziale) {
    if (y>0 && y<60) {
    vel = -(Math.round((y-(larghezzamovie/2))/10));
    }
    if (y>260 && y<larghezzamovie) {
    vel = -(Math.round((y-(larghezzamovie/2))/10));
    }
    } else {
    if (vel>-1) {
    vel = 1;
    } else {
    vel = -1;
    }
    }
    }
    };
    function released() {
    _root.image = this.big;
    _root.box.play();
    _root.box.clip_mc.loadMovie(_root.image);
    _root.mc_desc.descrizione.text = this.desc;
    //_root.selezione._y = (larghezzamovie)/2;
    //_root.didascalia.text = this.etichetta.text;
    //getURL(percorso,"_blank")
    }
    function rollover() {
    _global.blocca=true;
    this._alpha = 100;
    }
    function rollout() {
    _global.blocca=false;
    this._alpha = 50;
    }
    _root.onEnterFrame = function() {
    if (letto) {
    for (i=1; i<=nfoto; i++) {
    _root["mc"+i]._y += vel;
    }
    if (vel>0 && _root["mc"+posSin]._y>0) {
    _root["mc"+posDes]._y = _root["mc"+posSin]._y-dimImm;
    posSin = posDes;
    posDes--;
    if (posDes == 0) {
    posDes = nfoto;
    }
    }
    if (vel<0 && _root["mc"+posSin]._y<=-dimImm) {
    _root["mc"+posSin]._y = _root["mc"+posDes]._y+dimImm;
    posDes = posSin;
    posSin++;
    if (posSin>nfoto) {
    posSin = 1;
    }
    }
    }
    };

  3. #3
    Utente di HTML.it L'avatar di albe66
    Registrato dal
    Sep 2000
    Messaggi
    274
    ho provato, ma nulla, non si ferma nemmeno così.

  4. #4
    metti questa condizione sull'onterFrame invece sul mouse move, dovrebbe andare

    if (!_global.blocca){

  5. #5
    Utente di HTML.it L'avatar di albe66
    Registrato dal
    Sep 2000
    Messaggi
    274
    già già... sull' onEnterFrame, fuzia.
    quindi la modifica giusta è (in rosso le parti modificate):

    function rollover() {
    _global.blocca=true;
    this._alpha = 100;
    }
    function rollout() {
    _global.blocca=false;
    this._alpha = 50;
    }
    _root.onEnterFrame = function() {
    if (!_global.blocca){
    if (letto) {
    for (i=1; i<=nfoto; i++) {
    _root["mc"+i]._y += vel;
    }
    if (vel>0 && _root["mc"+posSin]._y>0) {
    _root["mc"+posDes]._y = _root["mc"+posSin]._y-dimImm;
    posSin = posDes;
    posDes--;
    if (posDes == 0) {
    posDes = nfoto;
    }
    }
    if (vel<0 && _root["mc"+posSin]._y<=-dimImm) {
    _root["mc"+posSin]._y = _root["mc"+posDes]._y+dimImm;
    posDes = posSin;
    posSin++;
    if (posSin>nfoto) {
    posSin = 1;
    }
    }
    }
    };




    grazie stan.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.