Posts: 60
Location: Victor Harbor, South Australia
|
Ive created two scripts for you, one displays gifs, jpegs etc and one displays quicktime movies for you, if you like i can create a hybrid of both but you can simply as for that in this topic if youd like it
ok, heres the normal GIF, JPEG, PNG script
Code:
<script language="javascript" type="text/javascript">
yourImageList = new Array("image1.gif" , "image2.jpg" , "image3.gif" , "helloworld.jpg");
num = (Math.floor(Math.random()*(yourImageList.length)));
document.write("<img src=\"" + yourImageList[num] + "\" alt=\"Random Image\" />");
</script>
and heres the quicktime one
Code:
<script language="javascript" type="text/javascript">
yourQTMovieList = new Array("Movie1.mov" , "Movie2.mov");
num = (Math.floor(Math.random()*(yourQTMovieList.length)));
widthOfMovie = 100;
heightOfMovie = 100;
document.write("<OBJECT CLASSID='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' WIDTH='" + heightOfMovie + "' HEIGHT='" + widthOfMovie + "' CODEBASE='http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0'><PARAM NAME='controller' VALUE='TRUE'><PARAM NAME='type' VALUE='video/quicktime'><PARAM NAME='autoplay' VALUE='true'><PARAM NAME='target' VALUE='myself'><PARAM NAME='src' VALUE='" + yourQTMovieList[num] + "'><PARAM NAME='pluginspage' VALUE='http://www.apple.com/quicktime/download/indext.html'> <EMBED WIDTH='" + widthOfMovie + "' HEIGHT='" + heightOfMovie + "' CONTROLLER='TRUE' TARGET='myself' SRC='" + yourQTMovieList[num] + "' type='video/quicktime' BGCOLOR='#000000' BORDER='0' PLUGINSPAGE='http://www.apple.com/quicktime/download/indext.html'></EMBED></OBJECT>");
</script>
like i said i can create you a hybrid of both if you would like, i can also make it into a php version if youd like
__________________
Please login or register to view this content. Registration is FREE
Im new here so play nice :)
Last edited by pr0jekt; 04-27-2005 at 01:27 AM..
|