...

View Full Version : Need a hyperlink for picturecube



brit
10-04-2003, 09:46 PM
I need a hyperlink for each of the pictures inside this cube. Can someone tell me what part of the coding I need to change...

http://www.javascriptkit.com/script/script2/cubeslideshow.shtml

Also, it says it is only viewable on IE5 and above, does this mean that people who dont have this wont be able to see the images too? Or does it simply mean that they won't see the images rotate inside it.

Thanks, Brit

wildcard
10-05-2003, 12:30 AM
<script language="JavaScript1.1">

//Picture Cube slideshow - By Tony Foster III
//Modifications by JK
//Visit JavaScript Kit (http://javascriptkit.com) for script

var specifyimage=new Array() //Your images
specifyimage[0]="photo1.jpg"
specifyimage[1]="photo2.jpg"
specifyimage[2]="photo3.jpg"

var delay=3000 //3 seconds

//Counter for array
var count =1;

var cubeimage=new Array()
for (i=0;i<specifyimage.length;i++){
cubeimage[i]=new Image()
cubeimage[i].src=specifyimage[i]
}

function movecube(){
if (window.createPopup)
cube.filters[0].apply()
document.images.cube.src=cubeimage[count].src;
if (window.createPopup)
cube.filters[0].play()
count++;
if (count==cubeimage.length)
count=0;
setTimeout("movecube()",delay)
}

window.onload=new Function("setTimeout('movecube()',delay)")
</script>

<img src="photo1.jpg" name="cube" border=0 style="filter:progid:DXImageTransform.Microsoft.Stretch(stretchStyle='PUSH')">

:confused:I'm pretty sure that it means that the images won't rotate at all.
Hope this helps

brit
10-05-2003, 01:00 AM
Thanks, but I meant as the mouse hovers over each image, this would then be clicked onto another url or image.

Does anyone know how to do this, and what changes in code would there be?

Hope this clarifys :)

me'
10-05-2003, 12:38 PM
Also, it says it is only viewable on IE5 and above, does this mean that people who dont have this wont be able to see the images too? Or does it simply mean that they won't see the images rotate inside it.


People without IE5+ will be able to see the images, but they won't have the cube effect when they change.

brit
10-05-2003, 01:21 PM
Any idea how to get a url link for each picture?

me'
10-05-2003, 01:24 PM
var links = ['link1.html','link2.html','link3.html']

function movecube(){
if (window.createPopup)
cube.filters[0].apply()
document.images.cube.src=cubeimage[count].src;
document.getElementById('cubes').setAttribute('href',links[count]);
if (window.createPopup)
cube.filters[0].play()
count++;
if (count==cubeimage.length)
count=0;
setTimeout("movecube()",delay)
}

And then:


<a href="#" id="cubes">
<img src="photo1.jpg" name="cube" border=0 style="filterrogidXImageTransform.Microsoft.Stretch(stretchStyle='PUSH')">
</a>

brit
10-05-2003, 01:56 PM
Thanks very much!!:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum