Visualizzazione dei risultati da 1 a 3 su 3

Discussione: Avanti e indietro

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2004
    Messaggi
    353

    Avanti e indietro

    Ciao ragazzi! ho un codice xml dinamico, oer una galleria di immagini...quando l'utente clicca su una thumb appare l'immagine in grande a fianco, tutto fatto con xml e array per gestire i dati...

    vorrei creare 2 pulsanti, avanti e indietro, per fare una navigazione tipo slide. come posso fare?

    qualcuno sa darmi un'idea da dove partire???

    grazie
    ciao

  2. #2
    Come si fa a rispondere ad una domanda così?
    Bisognerebbe vedere il codice del tuo movie...

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2004
    Messaggi
    353
    hai ragione... scusa ma sono sempre di fretta...
    ecco, così estrappolo i dati e creo gli array:

    function Dati () {
    image_thumb = new Array();
    image_maxi = new Array();
    titolo = new Array();
    dim = new Array();
    tec = new Array();
    anno = new Array();

    for (k=0; k<=myarray.length; k++) {

    if (myarray[k].nodeName == "image_thumb") {
    image_thumb.push(myarray[k].childNodes.toString());
    } else if (myarray[k].nodeName == "image_maxi") {
    image_maxi.push(myarray[k].childNodes.toString());
    } else if (myarray[k].nodeName == "titolo") {
    titolo.push(myarray[k].childNodes.toString());
    } else if (myarray[k].nodeName == "dim") {
    dim.push(myarray[k].childNodes.toString());
    } else if (myarray[k].nodeName == "tec") {
    tec.push(myarray[k].childNodes.toString());
    } else if (myarray[k].nodeName == "anno") {
    anno.push(myarray[k].childNodes.toString());
    } else if (myarray[k].nodeName == "totrec") {
    totrec=myarray[k].childNodes.toString();
    }
    };
    };

    così creo le thumb con pulsante per richiamare le foto:
    function CreaTabelle () {
    for (i=0; i<image_thumb.length; i++) {
    attachMovie("clip_thumb", "clip_thumb"+i, i);
    _root["clip_thumb"+i]._x = 59.5
    _root["clip_thumb"+i]._y = 148.1+i*75;
    z = image_thumb[i];
    _root["clip_thumb"+i].image.my_mc.loadMovie ((this.z));
    _root["clip_thumb"+i].pulsante.k= image_maxi[i];
    var mioTitolo:String = new String(titolo[i]);
    mioTitolo = mioTitolo.split("&apos;").join("'");
    mioTitolo = mioTitolo.split("&amp;").join("&");
    mioTitolo = mioTitolo.split("quot;").join('"');
    _root["clip_thumb"+i].pulsante.j= mioTitolo;
    _root["clip_thumb"+i].pulsante.y= dim[i];
    var teca:String = new String(tec[i]);
    teca = teca.split("&apos;").join("'");
    teca = teca.split("&amp;").join("&");
    teca = teca.split("quot;").join('"');
    _root["clip_thumb"+i].pulsante.x= teca;
    _root["clip_thumb"+i].pulsante.w= anno[i];
    _root["clip_thumb"+i].pulsante.onPress = function() {
    if (tecnici.op == 1) {
    tecnici.gotoAndPlay(2);
    }
    foto.my_mc.loadMovie ((this.k));
    tecnici.titolo = (this.j);
    tecnici.dim = (this.y);;
    tecnici.tec = (this.x);
    tecnici.anno = (this.w);
    }
    };
    };

    potresti aiutarmi?
    grazie

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 © 2024 vBulletin Solutions, Inc. All rights reserved.