Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Aug 2003
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need a hyperlink for picturecube

    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/...lideshow.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

  • #2
    New to the CF scene
    Join Date
    Oct 2003
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    <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="filterrogidXImageTransform.Microsoft.Stretch(stretchStyle='PUSH')">


    I'm pretty sure that it means that the images won't rotate at all.
    Hope this helps
    Last edited by wildcard; 10-04-2003 at 11:33 PM.

  • #3
    Regular Coder
    Join Date
    Aug 2003
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #5
    Regular Coder
    Join Date
    Aug 2003
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Any idea how to get a url link for each picture?

  • #6
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    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:
    Code:
    <a href="#" id="cubes">
    <img src="photo1.jpg" name="cube" border=0 style="filterrogidXImageTransform.Microsoft.Stretch(stretchStyle='PUSH')">
    </a>
    Last edited by me'; 10-05-2003 at 12:35 PM.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #7
    Regular Coder
    Join Date
    Aug 2003
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks very much!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •