PDA

View Full Version : random slideshow



yasmin alsham
03-21-2011, 11:57 PM
I am using this code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Adobe GoLive" />
<title>Untitled Page</title><style type="text/css">

.flashclass{ /*sample CSS class added to image slideshow container*/
width: 700px; /*a width should be defined for transition to work*/
border: 0px solid orange;
padding: 0px;
}

.flashclass img{
border-width: 0;
}

</style>

<script type="text/javascript" src="transitionshow.js">




</script>
</head>

<body>
<p><script type="text/javascript">

var flashyshow=new flashyslideshow({ //create instance of slideshow
wrapperid: "myslideshow", //unique ID for this slideshow
wrapperclass: "flashclass", //desired CSS class for this slideshow
imagearray: [
["http://www.prestigedentalproducts.com/images/homslidshow/nordentinstrenew.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
["http://www.prestigedentalproducts.com/images/homslidshow/tuttnauer.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
["http://www.prestigedentalproducts.com/images/homslidshow/vonflex.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
["http://www.prestigedentalproducts.com/images/homslidshow/x-pod%20copy.jpg", "http://www.prestigedentalproducts.com", "_new", ""]
],
pause: 2000, //pause between content change (millisec)
transduration: 1000 //duration of transition (affects only IE users)
})

</script></p>
</body>

</html>


How can I mack this random so when refrash the page it will display a new image

jscheuer1
03-22-2011, 03:13 AM
<script type="text/javascript">

var flashyshow=new flashyslideshow({ //create instance of slideshow
wrapperid: "myslideshow", //unique ID for this slideshow
wrapperclass: "flashclass", //desired CSS class for this slideshow
imagearray: (function(){ return [
["http://www.prestigedentalproducts.com/images/homslidshow/nordentinstrenew.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
["http://www.prestigedentalproducts.com/images/homslidshow/tuttnauer.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
["http://www.prestigedentalproducts.com/images/homslidshow/vonflex.jpg", "http://www.prestigedentalproducts.com", "_new", ""],
["http://www.prestigedentalproducts.com/images/homslidshow/x-pod%20copy.jpg", "http://www.prestigedentalproducts.com", "_new", ""]
].sort(function(){return 0.5 - Math.random();});})(),
pause: 2000, //pause between content change (millisec)
transduration: 1000 //duration of transition (affects only IE users)
})

</script>