+ Reply
Page 2 of 2 FirstFirst 12
Results 21 to 33 of 33
  1. #21
    What's Jailbreak?
    Join Date
    May 2008
    Posts
    14
    Thanks
    5
    Thanked 1 Time in 1 Post
    This is great and exactly what I was looking for. I need some addl help though; exactly which line do I change to reset the timer interval? Thanks.

    Okay, I figured out the time, but I have another problem. I saved 6 wallpapers and 5 cycle and one isn't. Here's what I changed/added to the above file:

    <img src="Private/Fire.png"/>
    <img src="Private/Green.png"/>
    <img src="Private/Rock.png"/>
    <img src="Private/Purple.png"/>
    <img scr="Private/Platelette.png"/>
    <img scr="Private/Blackdot.png"/>

    The last one, Blackdot.png is the one that isn't cycling and I think I am getting a longer solid black background in its place when it should be cycling. This is also the main theme wallpaper/background for the theme I am using, but it's named wallpaper.png where it needs to be as part of the theme. I tried changing the wallpaper in my main theme to see if that had anything to do with it, and I still only get the solid black background, at a longer interval when 'blackdot' should be cycling.

    I've renamed it in my Private folder just in case there was a typo I am missing, but no luck. Any advice? Please help....I am so close to having this the way I'd like it! LOL
    Last edited by dublgrace; 11-07-2008 at 06:02 PM. Reason: Automerged Doublepost

  2. #22
    What's Jailbreak?
    Join Date
    Nov 2008
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 1 Post
    im having a problem where the pictures arent centered when i use this script. they are all about a half inch far to the right. they work fine when using them as just backgrounds

  3. #23
    plain jane vanilla (post count restored to FULL AWESOMENESS) cpjr's Avatar
    Join Date
    Jul 2007
    Location
    ATL
    Posts
    11,692
    Thanks
    181
    Thanked 1,457 Times in 1,263 Posts

    Quote Originally Posted by SimonCR19318 View Post
    im having a problem where the pictures arent centered when i use this script. they are all about a half inch far to the right. they work fine when using them as just backgrounds
    There is an area close to the top of the script for alignment. Its set to be centered, but you could adjust if needed.

    I dont know why it would just kick the pics over though. Are they sized at 320x480 exactly?

  4. #24
    What's Jailbreak?
    Join Date
    Nov 2008
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 1 Post
    Quote Originally Posted by cpjr View Post
    There is an area close to the top of the script for alignment. Its set to be centered, but you could adjust if needed.

    I dont know why it would just kick the pics over though. Are they sized at 320x480 exactly?
    yes they are all exact, i made a slide show using the wallpaper.html just editing the pics to the ones i wanted but still only this script is off just a little. weird

  5. #25
    plain jane vanilla (post count restored to FULL AWESOMENESS) cpjr's Avatar
    Join Date
    Jul 2007
    Location
    ATL
    Posts
    11,692
    Thanks
    181
    Thanked 1,457 Times in 1,263 Posts

    Quote Originally Posted by SimonCR19318 View Post
    yes they are all exact, i made a slide show using the wallpaper.html just editing the pics to the ones i wanted but still only this script is off just a little. weird
    Hmmm, bro i dunno. That is weird. Unless there's something on the springboard moving it over....but I cant think of anything that would do that.

  6. #26
    What's Jailbreak?
    Join Date
    Nov 2008
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 1 Post
    also cpjr if there is anyway u could mod the original saurik wallpaper.html to handle more than 2 images that would be awsome. the second type of code wouldnt fit right for me and it was killing my phones speed. the saurik one that i loaded handles 30 images but sometimes gets stuck on an infinite loop between 2 random ones. im a kiddie scripter at code writing but im learning some of it ( starting with C and Python), havent moved on to html, any flavor of it.
    Last edited by SimonCR19318; 11-14-2008 at 01:42 PM.

  7. #27
    What's Jailbreak?
    Join Date
    Sep 2008
    Posts
    4
    Thanks
    1
    Thanked 1 Time in 1 Post
    the saurik theme and my theme both cut off at the very bottom and at the top due to the dock and title bar does anyone know how to fix this im not happy jus having my project half done

  8. #28
    plain jane vanilla (post count restored to FULL AWESOMENESS) cpjr's Avatar
    Join Date
    Jul 2007
    Location
    ATL
    Posts
    11,692
    Thanks
    181
    Thanked 1,457 Times in 1,263 Posts

    Quote Originally Posted by usernamesn View Post
    the saurik theme and my theme both cut off at the very bottom and at the top due to the dock and title bar does anyone know how to fix this im not happy jus having my project half done
    I havent personally tried this....however, you could "hide" the dock in Winterboard and for the statusbar, you would want to create a "transparent" one...thus making it hidden as well.

    This should show off your entire image...if thats the goal.

    Well, I say I havent tried it....but ive used transparent docks and statusbars before.

    Quote Originally Posted by SimonCR19318 View Post
    also cpjr if there is anyway u could mod the original saurik wallpaper.html to handle more than 2 images that would be awsome. the second type of code wouldnt fit right for me and it was killing my phones speed. the saurik one that i loaded handles 30 images but sometimes gets stuck on an infinite loop between 2 random ones. im a kiddie scripter at code writing but im learning some of it ( starting with C and Python), havent moved on to html, any flavor of it.
    I havent messed with Sauriks code...I can take a look.

    And yeah, all the HTLM stuff will draw from processor resources and memory.....thus slower you down a bit. Video wallpapers are really bad at this.
    Last edited by cpjr; 11-17-2008 at 09:49 PM. Reason: Automerged Doublepost

  9. #29
    Green Apple 0okami.digital's Avatar
    Join Date
    Oct 2008
    Posts
    64
    Thanks
    11
    Thanked 6 Times in 6 Posts

    ----------edit: skip this msg to the next one------

    Hi everyone...

    Can someone confirm if the background switching between multiple images is working on 2.2 firmware?

    I can not get it working on my 3g with 2.2.
    All i see is a black screen...


    Code:
    <html><head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <style>
    body {
    background-color: black;
    margin: 0;
    padding: 0;
    height: 480px;
    width: 320px;
    }
    
    img {
    -webkit-transition-property: opacity;
    -webkit-transition-duration: 3s;
    position: absolute;
    width: 320px;
    height: auto;
    }
    
    img.fade-out {
    opacity: 0;
    }
    
    img.fade-in {
    opacity: 1;
    }
    </style>
    </head>
    <body style="color: black">
    
    <img src="wallpaper/touhou_001.jpg"/>
    <img src="wallpaper/touhou_002.jpg"/>
    <img src="wallpaper/touhou_003.jpg"/>
    <img src="wallpaper/touhou_004.jpg"/>
    
    <script>
    //
    // Displays each <img> once in random order before
    // randomizing the list again.
    // Just add an <img> tag with your filename to add a pic,
    // and change interval to control the cycle speed.
    
    var interval = 4 * 20; // Seconds between change
    
    var images = document.getElementsByTagName("img");
    var imageArray = [];
    var imageCount = images.length;
    var current = 0;
    
    var randomize = function(){
    return (Math.round(Math.random() * 3 - 1.5));
    }
    
    for(var i = 0; i < imageCount; i++){
    images[i].className = 'fade-out';
    imageArray[i] = images[i];
    }
    imageArray.sort(randomize);
    
    var fade = function(){
    
    imageArray[current++].className = 'fade-out';
    if(current == imageCount){
    current = 0;
    imageArray.sort(randomize);
    }
    imageArray[current].className = 'fade-in';
    
    setTimeout(fade, interval * 1000);
    };
    
    fade();
    </script>
    
    </body></html>
    Last edited by 0okami.digital; 12-05-2008 at 02:58 AM.
    ~0okami

  10. #30
    Green Apple 0okami.digital's Avatar
    Join Date
    Oct 2008
    Posts
    64
    Thanks
    11
    Thanked 6 Times in 6 Posts

    Disregard my last post.
    I got it working.
    You can modify fade interval and just keep adding pics.

    tested ok for me on 3g 2.2
    Code:
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <style>
            body {background-color: black;margin: 0;padding: 0;height: 480px;width: 320px;}
    
            img {-webkit-transition-property: opacity;-webkit-transition-duration: 3s;position: absolute;width: 320px;height: auto;}
            img.fade-out {opacity: 0;}
            img.fade-in {opacity: 1;}
        </style>
    </head>
    
    
    <body style="color: black">
    
    
    
    <img src="Wallpapers/touhou_001.jpg"/>
    <img src="Wallpapers/touhou_002.jpg"/>
    <img src="Wallpapers/touhou_003.jpg"/>
        
    
        <script>
               
    
    //  Displays each <img> once in random order before
    //  randomizing the list again.
    //  Just add an <img> tag with your filename to add a pic,
    //  and change interval to control the cycle speed.
    
            var interval = 20;  // Seconds between change
            var images = document.getElementsByTagName("img");
            var imageArray = [];
            var imageCount = images.length;
            var current = 0;
            var randomize = function(){return (Math.round(Math.random() * 3 - 1.5));}
    
    for(var i = 0; i < imageCount; i++){images[i].className = 'fade-out';imageArray[i] = images[i];}
            imageArray.sort(randomize);var fade = function(){imageArray[current++].className = 'fade-out';if(current == imageCount){current = 0;imageArray.sort(randomize);}
                imageArray[current].className = 'fade-in';setTimeout(fade, interval * 1000);};fade();
        
    </script>
    
    </body>
    </html>
    Attached Files Attached Files
    Last edited by 0okami.digital; 12-05-2008 at 03:10 AM.
    ~0okami

  11. The Following User Says Thank You to 0okami.digital For This Useful Post:

    Pistol1 (07-15-2009)

  12. #31
    iPhone? More like MyPhone
    Join Date
    Dec 2008
    Posts
    193
    Thanks
    0
    Thanked 8 Times in 8 Posts

    if i use the script cpjr posted it works but when i try to load a lot of images into it, it crashes the phone. there is another script that uses an array and you enter the filenames, and that works fine but it sucks and isn't random. is there anyway to define the images variable as an array and forget the img_src stuff in the body? do something like var images = ['1.png','2.png', etc... ] ? i tried this and it doesn't work at all.

  13. #32
    Green Apple 0okami.digital's Avatar
    Join Date
    Oct 2008
    Posts
    64
    Thanks
    11
    Thanked 6 Times in 6 Posts

    Anyone have any luck at making it random?
    ~0okami

  14. #33
    What's Jailbreak?
    Join Date
    May 2012
    Location
    San Clemente
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can anyone help me? How do I have the image sequence not randomize " imageArray.sort(randomize); "

+ Reply
Page 2 of 2 FirstFirst 12

Posting Permissions

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