Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
anyone good with Javascript?

I've been trying to build my own theme (very basic) but the part that's got me stuck is the rotating background script (which I've borrowed from another theme that I found ages ago, but can't find now!!)

here it is

<img id="img1" class="fade-in">
<img id="img2" class="fade-out">
<script>
var interval = 2 * 8;
var imageDir = "";
var duration = 3;
var images = [
"xmas0.jpg",
"xmas1.jpg",
"xmas2.jpg",
"xmas3.jpg",
"xmas4.jpg",
"xmas5.jpg",
"xmas6.jpg",
"xmas7.jpg",
];

var index = 0;
var imageCount = images.length;

var randomize = function(){
return Math.round(5 - 10 * Math.random());
};

var fade = function(){
img1.style.zIndex = 1;
img2.style.zIndex = 2;
img1.className = "fade-in";
img2.className = "fade-out";

index = (index + 1) % imageCount;
if(!index){
images.sort(randomize);
}

var tmp = img1;
img1 = img2;
img2 = tmp;

setTimeout(function(){img1.src = imageDir + images[index];}, duration * 1000);
setTimeout(fade, interval * 1000);
};

images.sort(randomize);
img1.src = imageDir + images[index];
fade();
</script>

now, this is supposed to change the images..which it does...but...insead of being image - image - image etc, I get image - blank screen - image - blank screen.

can ony one point out where I might have gone wrong to keep getting a blank screen inserted between each image change?
 
Made new signal theme. Still working on wifi icons now

EDIT: Does anyone know how to drop the widgets down in height? There's a big gap between the dock and widget so I was trying to move the widgets down as far as I could but don't know which file to edit. Thanks.
 

Attachments

  • photo.jpg
    photo.jpg
    105 KB · Views: 79
Last edited:
Project9 by BlueMetal. Amazing Theme.
 

Attachments

  • IMG_0469.PNG
    IMG_0469.PNG
    355.1 KB · Views: 58
  • IMG_0472.PNG
    IMG_0472.PNG
    463.2 KB · Views: 65
  • IMG_0471.PNG
    IMG_0471.PNG
    804.7 KB · Views: 55
Not been able to do much recently what with work and Holiday season
Have just played around with widget for Lock and Homescreen

28irdxj.png


2aes2fa.png
 
Not been able to do much recently what with work and Holiday season
Have just played around with widget for Lock and Homescreen

28irdxj.png

Looks great LEXS. Glad to see you're back!

I've been wondering about the calendar widget at the bottom of your lock screen, but I can't seem to find the answer. Is this iPhone 4 compatible only and how would you go about getting it on your lockscreen like you've got here?

I downloaded the calendar and weather widget and installed it, but when I activate it in Winterboard on my 3GS, nothing shows up. If it's iPhone 4 only, does anyone know of something similar for the 3GS and how I could put it on the lockscreen as opposed to the springboard?
 
Springboard widget is NICE! :D Great work as always LEX

Thank You :)

Looks great LEXS. Glad to see you're back!

I've been wondering about the calendar widget at the bottom of your lock screen, but I can't seem to find the answer. Is this iPhone 4 compatible only and how would you go about getting it on your lockscreen like you've got here?

I downloaded the calendar and weather widget and installed it, but when I activate it in Winterboard on my 3GS, nothing shows up. If it's iPhone 4 only, does anyone know of something similar for the 3GS and how I could put it on the lockscreen as opposed to the springboard?

Not sure which widgets you are using
It should work on 3G change the widget html to LockBackground html
If you want to send me what you are using I still have my old phone
and I will see if I can get it to work

I did read your comments way back and Thank you for your support :)
 
Not been able to do much recently what with work and Holiday season
Have just played around with widget for Lock and Homescreen
2aes2fa.png

Very nice! !
Weather you want to mimic the size and placement of widgets icon
I can not share a calendar with weather widgets?
 
Thank You :)



Not sure which widgets you are using
It should work on 3G change the widget html to LockBackground html
If you want to send me what you are using I still have my old phone
and I will see if I can get it to work

I did read your comments way back and Thank you for your support :)

I'll get those files together tonight and shoot you a PM, LEXS.

And you're welcome on the support. I'm just glad to see you posting again! I thought maybe you'd said "to heck with it" and given up with this forum. I appreciate you didn't! :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.