Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di N3llo
    Registrato dal
    Apr 2007
    Messaggi
    79

    SLide scorrevole verticale(JuliusDesign)

    Salve dal blog di julius ho preso uno slideshow scorrevole orizzontale,l'ho trasformato in verticale solo che portando il mouse verso l'altro la velocità aumenta,ma portandolo verso il basso essa non diminuisce mai,vi posto il codice magari riuscite a darmi una dritta:

    Codice PHP:
    larghezzamovie Stage.heightposSin 1vel = -3dimImm 179selezione._x 100letto falseleggi = 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=0i<nfotoi++) {                 _root.attachMovie("mc""mc"+(i+1), i+1);                 _root["mc"+(i+1)]._y dimImm*i;                 _root["mc"+(i+1)]._x 0;                 _root["mc"+(i+1)].big this.childNodes[i].attributes.photo_big;                 _root["mc"+(i+1)].this.childNodes[i].attributes.photo;                 _root["mc"+(i+1)].contenitore.loadMovie(this.childNodes[i].attributes.photo);                 _root["mc"+(i+1)]._alpha 50;                 _root["mc"+(i+1)].onRelease released;             }             letto true;         } else {             _root.didascalia.text "errore di lettura";         }     }; }; leggi(); _root.onMouseMove = function() {     _root._ymouse;     _root._ymouse;     if (y>20 && y<80 && x>=&& x<=larghezzamovie) {         vel = -(Math.round((y-(larghezzamovie/2))/10));     } }; function released() {     _root.box.loadMovie(this.big);     _root.selezione._y = (larghezzamovie)/2;     _root.didascalia.text this.etichetta.text;     //getURL(percorso,"_blank") } _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;             }         }     } }; 

  2. #2
    Utente di HTML.it L'avatar di N3llo
    Registrato dal
    Apr 2007
    Messaggi
    79
    larghezzamovie = Stage.height;
    posSin = 1;
    vel = -3;
    dimImm = 179;
    selezione._x = 100;
    letto = false;
    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;
    _root["mc"+(i+1)]._x = 0;
    _root["mc"+(i+1)].big = this.childNodes[i].attributes.photo_big;
    _root["mc"+(i+1)].a = this.childNodes[i].attributes.photo;
    _root["mc"+(i+1)].contenitore.loadMovie(this.childNodes[i].attributes.photo);
    _root["mc"+(i+1)]._alpha = 50;
    _root["mc"+(i+1)].onRelease = released;
    }
    letto = true;
    } else {
    _root.didascalia.text = "errore di lettura";
    }
    };
    };
    leggi();
    _root.onMouseMove = function() {
    x = _root._ymouse;
    y = _root._ymouse;
    if (y>20 && y<80 && x>=0 && x<=larghezzamovie) {
    vel = -(Math.round((y-(larghezzamovie/2))/10));
    }
    };
    function released() {
    _root.box.loadMovie(this.big);
    _root.selezione._y = (larghezzamovie)/2;
    _root.didascalia.text = this.etichetta.text;
    //getURL(percorso,"_blank")
    }
    _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
    metti il caso che il mio swf è alto 300

    da linea 32

    codice:
    _root.onMouseMove = function() {
    	x = _root._ymouse;
    	y = _root._ymouse;
    
    	if (y>0 && y<20 ) {
    		vel = -(Math.round((y-(larghezzamovie/2))/10));
    			
    	}
    	
    		if (y>290 && y<larghezzamovie ) {
    		vel = -(Math.round((y-(larghezzamovie/2))/10));
    		
    	}
    
    };

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.