Visualizzazione dei risultati da 1 a 2 su 2

Discussione: slideshow

  1. #1
    Utente di HTML.it L'avatar di cersy
    Registrato dal
    Dec 2001
    Messaggi
    68

    slideshow

    Sto cercando un javascript per uno slideshow, il problema è che non voglio che le immagini rotino ma semplicemente che appaiono una dopo l'altra e poi si fermino...
    Qualcuno mi può aiutare? grazie

  2. #2
    Utente di HTML.it L'avatar di cersy
    Registrato dal
    Dec 2001
    Messaggi
    68
    in realtà avrei trovato questo, ma vorrei modificarlo per dargli un effetto fade. Qualcuno sa come fare?

    <script type="text/javascript">

    // Flexible Image Slideshow- By JavaScriptKit.com (http://www.javascriptkit.com)
    // For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
    // This notice must stay intact for use

    var ultimateshow=new Array()

    //ultimateshow[x]=["path to image", "OPTIONAL link for image", "OPTIONAL link target"]

    ultimateshow[0]=['java1.jpg']
    ultimateshow[1]=['java2.jpg']
    ultimateshow[2]=['java3.jpg']
    ultimateshow[3]=['java4.jpg']

    //configure the below 3 variables to set the dimension/background color of the slideshow

    var slidewidth="310px" //set to width of LARGEST image in your slideshow
    var slideheight="229px" //set to height of LARGEST iamge in your slideshow
    var slidecycles="1" //number of cycles before slideshow stops (ie: "2" or "continous")
    var randomorder="no" //randomize the order in which images are displayed? "yes" or "no"
    var preloadimages="yes" //preload images? "yes" or "no"
    var slidebgcolor='336633'

    //configure the below variable to determine the delay between image rotations (in miliseconds)
    var slidedelay=2000

    ////Do not edit pass this line////////////////

    var ie=document.all
    var dom=document.getElementById
    var curcycle=0

    if (preloadimages=="yes"){
    for (i=0;i<ultimateshow.length;i++){
    var cacheimage=new Image()
    cacheimage.src=ultimateshow[i][0]
    }
    }

    var currentslide=0

    function randomize(targetarray){
    ultimateshowCopy=new Array()
    var the_one
    var z=0
    while (z<targetarray.length){
    the_one=Math.floor(Math.random()*targetarray.lengt h)
    if (targetarray[the_one]!="_selected!"){
    ultimateshowCopy[z]=targetarray[the_one]
    targetarray[the_one]="_selected!"
    z++
    }
    }
    }

    if (randomorder=="yes")
    randomize(ultimateshow)
    else
    ultimateshowCopy=ultimateshow

    function rotateimages(){
    curcycle=(currentslide==0)? curcycle+1 : curcycle
    ultcontainer='<center>'
    if (ultimateshowCopy[currentslide][1]!="")
    ultcontainer+='<a href="'+ultimateshowCopy[currentslide][1]+'" target="'+ultimateshowCopy[currentslide][2]+'">'
    ultcontainer+='[img]'+ultimateshowCopy[currentslide][0]+'[/img]'
    if (ultimateshowCopy[currentslide][1]!="")
    ultcontainer+='</a>'
    ultcontainer+='</center>'
    if (ie||dom)
    crossrotateobj.innerHTML=ultcontainer
    if (currentslide==ultimateshow.length-1) currentslide=0
    else currentslide++
    if (curcycle==parseInt(slidecycles) && currentslide==0)
    return
    setTimeout("rotateimages()",slidedelay)
    }

    if (ie||dom)
    document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+' ; background-color:'+slidebgcolor+'"></div>')

    function start_slider(){
    crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
    rotateimages()
    }

    if (ie||dom)
    window.onload=start_slider
    </script>

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