Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Link foto in Flash Template

    Ciao a tutti,

    Premetto che sono principiante per quanto riguarda Flash.

    Ho appena customizzato un template flash per la mia attività di Web Design.

    Il template ha una sezione Porfolio fatto da una barra di thumbnail e una sezione centrale che visualizza l'immagine scelta dalla barra. La sezione portfolio pesca le foto (e relativi Thumbnail) da una cartella img.

    Problema:

    Per com'è adesso la sezione portfolio non contempla un link per ogni immagine che porti al relativo sito/lavoro.

    Soluzione richiesta:

    Ho bisogno di capire come fare modificare la sezione portfolio in modo tale che ogni foto possa avere un link che porti al relativo lavoro.

    Il massimo sarebbe avere la sezione portfolio che legge i dati da un array in un file esterno così che diventa semplicissimo aggiungere/modificare l'elenco senza entrare in flash e dover ri-pubblicare il SWF.

    Help Please

    Mille grazie

  2. #2
    ecco il codice associato alla pagina:

    import mx.transitions.*;
    import mx.transitions.easing.*;
    //
    var numberImages:Number = 12;
    var thumbPerPage:Number = 4;
    var numberSets = Math.ceil(numberImages/thumbPerPage);
    var thumbPath:String = "gallery/thumb";
    var imPath:String = "gallery/im";
    var targetIm:String = imPath+1+".jpg";
    var galleryPath:String = _root.pages.page2.gallery;
    var numTh:Number = 1;
    var numSet:Number = 1;
    var num:Number = 1;
    set1.gotoAndStop(2);
    //
    function arrayThumbs() {
    for (var i = 1; i<=thumbPerPage; i++) {
    var thumbName = this["th"+i];
    thumbName.index = i;
    thumbName._visible = true;
    thumbName.onRollOver = function() {
    this.gotoAndPlay("over");
    };
    thumbName.onRollOut = thumbName.onReleaseOutside=function () {
    this.gotoAndPlay("out");
    };
    thumbName.onRelease = function() {
    var numIm = this.index+((numSet-1)*thumbPerPage);
    targetIm = imPath+numIm+".jpg";
    mcLoader.loadClip(targetIm, imContainer);
    };
    }
    numTh = ((numSet-1)*thumbPerPage)+1;
    var targetThumb = thumbPath+numTh+".jpg";
    mcLoaderThumbs.loadClip(targetThumb, th1.thContainer);
    }
    //
    for (var i = 1; i<=numberSets; i++) {
    var nameSet = this["set"+i];
    nameSet.index = i;
    nameSet.num.txtNum.text = i;
    nameSet.onRollOver = function() {
    if (numSet != this.index) {
    this.gotoAndStop(2);
    }
    };
    nameSet.onRollOut = nameSet.onReleaseOutside=function () {
    if (numSet != this.index) {
    this.gotoAndStop(1);
    }
    };
    nameSet.onRelease = function() {
    if (numSet != this.index) {
    galleryPath["set"+numSet].gotoAndStop(1);
    numSet = this.index;
    arrayThumbs();
    }
    };
    }
    // btnNext
    btnNext.onRollOver = function() {
    this.gotoAndPlay("over");
    };
    btnNext.onRollOut = btnNext.onReleaseOutside=function () {
    this.gotoAndPlay("out");
    };
    btnNext.onRelease = function() {
    galleryPath["set"+numSet].gotoAndStop(1);
    numSet += 1;
    if (numSet>numberSets) {
    numSet = 1;
    }
    arrayThumbs();
    galleryPath["set"+numSet].gotoAndStop(2);
    };
    //
    // btnPrev
    btnPrev.onRollOver = function() {
    this.gotoAndPlay("over");
    };
    btnPrev.onRollOut = btnPrev.onReleaseOutside=function () {
    this.gotoAndPlay("out");
    };
    btnPrev.onRelease = function() {
    galleryPath["set"+numSet].gotoAndStop(1);
    numSet -= 1;
    if (numSet == 0) {
    numSet = numberSets;
    }
    arrayThumbs();
    galleryPath["set"+numSet].gotoAndStop(2);
    };
    //------------------------------------------------------------------------------------------
    //
    // Loading Thumbs
    //
    var mcLoaderThumbs:MovieClipLoader = new MovieClipLoader();
    var loadListenerThumbs:Object = new Object();
    loadListenerThumbs.onLoadStart = function(mcTarget) {
    var thumbName = galleryPath["th"+num];
    thumbName.attachMovie("mcLoading", "mcLoading", 1);
    thumbName.mcLoading._x = (thumbName._width-thumbName.mcLoading._width)/2;
    thumbName.mcLoading._y = (thumbName._height-thumbName.mcLoading._height)/2;
    };
    loadListenerThumbs.onLoadComplete = function(mcTarget) {
    var thumbName = galleryPath["th"+num];
    thumbName.mcLoading.removeMovieClip();
    thumbName.thContainer._alpha = 0;
    };
    loadListenerThumbs.onLoadInit = function(mcTarget) {
    if (num<4) {
    num++;
    numTh++;
    var targetThumb = thumbPath+numTh+".jpg";
    var thumbName = galleryPath["th"+num];
    mcLoaderThumbs.loadClip(targetThumb, thumbName.thContainer);
    thumbName._visible = true;
    if (numTh>numberImages) {
    thumbName._visible = false;
    }
    } else {
    num = 1;
    }
    var tweenAlpha = new Tween(mcTarget, "_alpha", None.easeIn, mcTarget._alpha, 100, .6, true);
    };
    mcLoaderThumbs.addListener(loadListenerThumbs);
    //------------------------------------------------------------------------------------------
    //
    // Loading Image
    //
    var mcLoader:MovieClipLoader = new MovieClipLoader();
    var loadListener:Object = new Object();
    loadListener.onLoadStart = function(mcTarget) {
    attachMovie("mcLoading", "mcLoading", 1);
    mcLoading._x = imBorder._x+(imBorder._width-mcLoading._width)/2;
    mcLoading._y = imBorder._y+(imBorder._height-mcLoading._height)/2;
    attachMovie("mcPercents", "mcPercents", 2, {_x:mcLoading._x-8, _y:mcLoading._y+30});
    };
    loadListener.onLoadProgress = function(mcTarget, bytesLoaded, bytesTotal) {
    var percents = Math.ceil(bytesLoaded/bytesTotal*100);
    mcPercents.txtPercents.text = percents+"%";
    };
    loadListener.onLoadComplete = function(mcTarget) {
    mcLoading.removeMovieClip();
    mcPercents.removeMovieClip();
    mcTarget._alpha = 0;
    };
    loadListener.onLoadInit = function(mcTarget) {
    var tweenAlpha = new Tween(mcTarget, "_alpha", None.easeIn, mcTarget._alpha, 100, .6, true);
    };
    mcLoader.addListener(loadListener);
    // End Loading Image
    //------------------------------------------------------------------------------------------
    mcLoader.loadClip(targetIm, imContainer);
    arrayThumbs();

  3. #3
    Help!!

    Non c'è nessuno che puoi aiutarmi?

    thanks

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.