Results 1 to 3 of 3

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: changing wallpaper

  1. #1
    Default changing wallpaper
    hi everyone,
    I think this question was already posted, but i coulnd't find it.

    I'm building a theme, and i want to have a "changing wallpaper" every "X" seconds.

    I know that I must create an .html file, I know that I can copy Saurik.theme's .html, but it has only 2 wallpapers and I want to have 8-9 wallpapers changing. How can i do that? I mean... how is the html code made? Can someone tell me some themes in WinterBoard that have the html wallpaper with more than 2 pictures, so than I will copy it with my wallpapers? Thanks guys =D

    ok, I've just figured it out... but I can't understand why there is a black line on the leften side... can someone explain me what I did wrong? That's the code i used:

    <?xml version="1.0" encoding="UTF-8"?>
    <html><head>
    <base href="Private/"/>
    <!--meta name="viewport" content="width=320, minimum-scale=1.0, maximum-scale=1.0"/-->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

    <style>
    body {
    height: auto;
    width: auto;
    }

    img {
    -webkit-transition-property: opacity;
    -webkit-transition-duration: 3s;
    width: auto;
    height: auto;
    }

    img.fade-out {
    opacity: 1;
    }

    img.fade-in {
    opacity: 0;
    }
    </style>
    </head><body style="color: black">
    <img id="one"/>
    <img id="two"/>

    <script>
    var images = ['X.png', 'Y.png', 'Z.png', 'A.png'];
    var index = 0;

    var fade_in = one;
    var fade_out = two;

    fade_in.src = images[0];
    fade_out.src = images[images.length - 1];

    var fade = function () {
    fade_in.src = images[index];
    index = (index + 1) % images.length;

    fade_in.className = 'fade-out';
    fade_out.className = 'fade-in';

    var fade_tmp = fade_in;
    fade_in = fade_out;
    fade_out = fade_tmp;

    setTimeout(fade, 5000);
    };

    fade();
    </script>
    </body></html>
    Last edited by | ChAoS |; 01-22-2011 at 11:08 AM. Reason: Automerged Doublepost

  2. #2
    iPhone? More like MyPhone Thenextkiller's Avatar
    Join Date
    Jun 2010
    Location
    USA
    Posts
    203
    Thanks
    5
    Thanked 45 Times in 39 Posts

    I am not sure but try this...

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <html><head>
    <base href="Private/"/>
    <!--meta name="viewport" content="width=320, minimum-scale=1.0, maximum-scale=1.0"/-->
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    
    <style>
    body {
    height: auto;
    width: auto;
    }
    
    img {
    -webkit-transition-property: opacity;
    -webkit-transition-duration: 3s;
    width: auto;
    height: auto;
    }
    
    img.fade-out {
    opacity: 1;
    }
    
    img.fade-in {
    opacity: 0;
    }
    </style>
    </head><body style="color: black">
    <img id="one"/>
    <img id="two"/>
    <img id="three"/>
    <img id="four"/>
    
    <script>
    var images = ['X.png', 'Y.png', 'Z.png', 'A.png'];
    var index = 0;
    
    var fade_in = one;
    var fade_out = two;
    var fade_in = three;
    var fade_out = four;
    
    fade_in.src = images[0];
    fade_out.src = images[images.length - 1];
    
    var fade = function () {
    fade_in.src = images[index];
    index = (index + 1) % images.length;
    
    fade_in.className = 'fade-out';
    fade_out.className = 'fade-in';
    
    var fade_tmp = fade_in;
    fade_in = fade_out;
    fade_out = fade_tmp;
    
    setTimeout(fade, 5000);
    };
    
    fade();
    </script>
    </body></html>
    Am firin ma lasah

  3. #3
    incredibly, I got finally to work. I just edited the code with some little strings, and it worked perfectly. Either... thank you.

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