Slideshow wallpaper script

Discussion in 'iOS Themes and Customization' started by Vesper, Feb 1, 2010.

  1. Vesper

    Vesper Member

    Joined:
    Feb 2, 2009
    Messages:
    922
    Likes Received:
    1
    Device:
    iPhone 4S (Black)
    I was wondering if anyone who knows how to write html scripts could help me with one for changing wallpapers sequentially. I have seen a few but they do random changes and I couldn't figure out how to remove the random element. the one I was using mainly was the html file from the Ultimate babes theme from the sleepers.net repo. Any help would be appreciated.

    this is the script I have so far
    Code:
    <HEAD>
    <style type="text/css">
            body {
                background-color: black;
                margin: 0;
                padding: 0 0 0 0;
                height: 480px;
                width: 320px;
            }
    img {
                position: absolute;
                width: 320px;
                height: auto;
            }
    </style>
    
    <SCRIPT LANGUAGE="JavaScript">
    
    // Set slideShowSpeed (milliseconds)
    var slideShowSpeed = 15000;
    // Duration of crossfade (seconds)
    var crossFadeDuration = 2;
    // Specify the image files
    var Pic = new Array();
    // to add more images, just continue
    // the pattern, adding to the array below
    TotalListSize = 720;
    
    // do not edit anything below this line
    var i;
    var t;
    var j = 0;
    var Seed = Now.getSeconds();
    
    function runSlideShow() 
    {
    	if (document.all) 
    	{
    		document.images.SlideShow.style.filter="blendTrans(duration=2)";
    		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
    		document.images.SlideShow.filters.blendTrans.Apply();
    	}
    	i = j+1;
    	document.images.SlideShow.src = "Private/" + i + ".jpg";
    
    	if (document.all) 
    	{
    		document.images.SlideShow.filters.blendTrans.Play();
    	}
    	i = Math.floor(Math.random(Seed) * TotalListSize);
    	j = Math.floor(Math.random(i) * TotalListSize);
    	Seed = j;
    	t = setTimeout('runSlideShow()', slideShowSpeed);
    
    }
    </script>
    
    </HEAD>
    
    <BODY onLoad="runSlideShow()">
    <img src="Private/1.jpg" name='SlideShow' width=320 height=480 style="left: 0px; top: -2px">
    
    </script>
    </body></html>
    
    ------------------double post merged------------------
    This is the other one I found but I don't know how to change it to take images from a folder or to accept a greater number of images
    Code:
    <script>
    var speed = 1000
    var Pic = new Array()
    
    Pic[0] = '1.jpg'
    Pic[1] = '2.jpg'
    Pic[2] = '3.jpg'
    Pic[3] = '4.jpg'
    Pic[4] = '5.jpg'
    
    
    var t
    var j = 0
    var p = Pic.length
    
    var preLoad = new Array()
    for (i = 0; i < p; i++){
       preLoad[i] = new Image()
       preLoad[i].src = Pic[i]
    }
    
    function runSlideShow(){
       document.images.SlideShow.src = preLoad[j].src
       j = j + 1
       if (j > (p-1)) j=0
       t = setTimeout('runSlideShow()', speed)
    }
    
    </script>
      
    <body onload="runSlideShow()">  
    
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td id="VU" height=150 width=150>
    <img src="1.jpg" name='SlideShow' width=150 height=150></td>
    </tr>
    </table>
    
  2. dgxnil

    dgxnil Member

    Joined:
    Dec 26, 2008
    Messages:
    690
    Likes Received:
    0
    Device:
    3G iPod touch
    in the delnoch theme, there's rotating walls, in order. patrese cleaned it up for us you should check in the old delnoch mod threads.
  3. Vesper

    Vesper Member

    Joined:
    Feb 2, 2009
    Messages:
    922
    Likes Received:
    1
    Device:
    iPhone 4S (Black)
    thanks I'll check out that thread. I looked at those have a 9 image limit. The random one above has no limit. I just need to to not be random anymore.
  4. iHaxU

    iHaxU New Member

    Joined:
    Mar 16, 2009
    Messages:
    276
    Likes Received:
    0
    Device:
    4G iPod touch
    Have you tried this? NOTE: not mine just stumbled across it in a theme

  5. Vesper

    Vesper Member

    Joined:
    Feb 2, 2009
    Messages:
    922
    Likes Received:
    1
    Device:
    iPhone 4S (Black)
    yeah, I have tried a similar one but the problem is that it used a set number of images. I would like one that I can add files to and not have to add more strings to the script. The first one I posted from the Ultimate babes theme does that but it displays them randomly and it supports 900+ images as long as they are correctly named sequentially. I just need the random part removed. I appreciate the suggestion.
  6. Vesper

    Vesper Member

    Joined:
    Feb 2, 2009
    Messages:
    922
    Likes Received:
    1
    Device:
    iPhone 4S (Black)
    bumping up for fresh eyes. Anyone know how I could do this?
  7. dgxnil

    dgxnil Member

    Joined:
    Dec 26, 2008
    Messages:
    690
    Likes Received:
    0
    Device:
    3G iPod touch
    well im pretty sure you can change up the delnoch theme's one to make the max wallpaper different.

    edit: just read the above, thing you wrote so disregard what i wrote.

Share This Page