Witam, prosiłbym o pomoc w edycji poniższego java skryptu. Chciałbym go tak zmodyfikować aby zmieniając się obrazki przechodziły w jakiś sposób płynny. Chodzi zapewne o polecenie fade. Niestety nie wiem jak to zrobić, jak powinno wyglądać polecenie i w którym miejscu je wkleić? Byłoby miło gdyby ktoś też podał jak modyfikować te parametry/sposoby przechodzenia.

  1. <script language="javascript">
  2. /*
  3.  
  4. Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
  5.  
  6. For this script and more, visit <a href="http://www.javascriptkit.com" target="_blank">http://www.javascriptkit.com</a>
  7.  
  8. */
  9.  
  10. var delay=1000 //set delay in miliseconds
  11.  
  12. var curindex=0
  13.  
  14. var randomimages=new Array()
  15.  
  16. randomimages[0]="1.jpg"
  17.  
  18. randomimages[1]="5.jpg"
  19.  
  20. randomimages[2]="2.jpg"
  21.  
  22. randomimages[3]="4.jpg"
  23.  
  24. randomimages[4]="3.jpg"
  25.  
  26. randomimages[5]="6.jpg"
  27.  
  28. var preload=new Array()
  29. for (n=0;n<randomimages.length;n++)
  30. {
  31. preload[n]=new Image()
  32. preload[n].src=randomimages[n]
  33. }
  34.  
  35. document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">')
  36. function rotateimage()
  37. {
  38. if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
  39.  
  40. curindex=curindex==0? 1 : curindex-1
  41. }
  42. else
  43. curindex=tempindex
  44. document.images.defaultimage.src=randomimages[curindex]
  45. }
  46. setInterval("rotateimage()",delay)
  47. </script>
  48.  
  49.