inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 1, 2013 3:34:54 GMT -8
When posting code you need to use the [code] tag jrryan, what you just posted is of no use to me or anyone who would try to copy it. See how parts of that code is italicized, that's because Proboards is interpreting something in it as being BBCode for [i] meaning who ever copies or inspects that code from your post will be missing parts that have been erroneously interpreted. The parts that I can see tells me that code is super old since it is operating in a world where there were basically two browsers: Netscape and IE. The way it is testing if you're running the shiny new sate-of-the-art Netscape 6 is by checking if it has support for getElementById (something all browsers supports nowadays, including IE). It is therefore making assumptions that no longer apply in today's world but I cannot pinpoint where that that erroneous assumption propagates into the calculations if I only have part of the code.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 1, 2013 4:10:13 GMT -8
I'm heading to work now but I'll take a look later
|
|
inherit
196452
0
Nov 1, 2013 7:40:31 GMT -8
Baller95
What's for dinner?: Food
1,771
July 2013
baller95
|
Post by Baller95 on Oct 1, 2013 4:11:44 GMT -8
I assume that you backed it up before replacing those images? I'm going to put this code here for anyone that would like to use it on there site for the fall season, but first be warned that it may not work for everyone. I have no issues at all with FF24 or IE9 WIN7: <script language="Javascript1.2" type="text/javascript"> //This Code Free To Use - Providing This Notice Remains// //Autumn leaves- by Kurt Grigg (kurt.grigg@virgin.net)// //Modified by Dynamic Drive for NS6 functionality// //visit http://www.dynamicdrive.com for this script// //Javascript Code Effect Found At: Development Resource & Javascript Code & Generator Public Archive Center// //Located: http://www.DesignerWiz.com// //Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply*// //Pre-load your image below! grphcs=new Array(6) Image0=new Image(); Image0.src=grphcs[0]="http://i43.tinypic.com/5po0f7.gif" Image1=new Image(); Image1.src=grphcs[1]="http://i39.tinypic.com/b85z09.gif" Image2=new Image(); Image2.src=grphcs[2]="http://i44.tinypic.com/2uhmikm.gif" Image3=new Image(); Image3.src=grphcs[3]="http://i44.tinypic.com/2yvnbb5.gif" Image4=new Image(); Image4.src=grphcs[4]="http://i42.tinypic.com/25hppja.gif" Image5=new Image(); Image5.src=grphcs[5]="http://i42.tinypic.com/15x21iq.gif"
Amount=8; //Smoothness depends on image file size, the smaller the size the more you can use! Ypos=new Array(); Xpos=new Array(); Speed=new Array(); Step=new Array(); Cstep=new Array(); ns=(document.layers)?1:0; ns6=(document.getElementById&&!document.all)?1:0;
if (ns){ for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+rndPic+"></LAYER>"); } } else{ document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i = 0; i < Amount; i++){ var P=Math.floor(Math.random()*grphcs.length); rndPic=grphcs[P]; document.write('<img id="si'+i+'" src="'+rndPic+'" style="position:absolute;top:0px;left:0px">'); } document.write('</div></div>'); } WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight; WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth; for (i=0; i < Amount; i++){ Ypos[i] = Math.round(Math.random()*WinHeight); Xpos[i] = Math.round(Math.random()*WinWidth); Speed[i]= Math.random()*5+3; Cstep[i]=0; Step[i]=Math.random()*0.1+0.05; } function fall(){ var WinHeight=(ns||ns6)?window.innerHeight:window.document.body.clientHeight; var WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth; var hscrll=(ns||ns6)?window.pageYOffset:document.body.scrollTop; var wscrll=(ns||ns6)?window.pageXOffset:document.body.scrollLeft; for (i=0; i < Amount; i++){ sy = Speed[i]*Math.sin(90*Math.PI/180); sx = Speed[i]*Math.cos(Cstep[i]); Ypos[i]+=sy; Xpos[i]+=sx; if (Ypos[i] > WinHeight){ Ypos[i]=-60; Xpos[i]=Math.round(Math.random()*WinWidth); Speed[i]=Math.random()*5+3; } if (ns){ document.layers['sn'+i].left=Xpos[i]+'px'; document.layers['sn'+i].top=Ypos[i]+hscrll+'px'; } else if (ns6){ document.getElementById("si"+i).style.left=Math.min(WinWidth,Xpos[i])+'px'; document.getElementById("si"+i).style.top=Ypos[i]+hscrll+'px'; } else{ eval("document.all.si"+i).style.left=Xpos[i]+'px'; eval("document.all.si"+i).style.top=Ypos[i]+hscrll+'px'; } Cstep[i]+=Step[i]; } setTimeout('fall()',20); }
window.onload=fall //--> </script> Hope it works for everyone! Works great! Is there any way to slow down the fall?
|
|
inherit
196452
0
Nov 1, 2013 7:40:31 GMT -8
Baller95
What's for dinner?: Food
1,771
July 2013
baller95
|
Post by Baller95 on Oct 1, 2013 5:24:08 GMT -8
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Oct 1, 2013 7:03:48 GMT -8
@ blc@ JaguarThis is only FYI to show my settigs at Photobucket for hosting image links: I copy/paste the url from Direct: which that link does not have ~original at the end. Right now I have the Falling Leaves code w/Photobucket hosting those leafs on my test site: test sitewith no problems at all. You may want to take a look at your settings at Photobucket to see if there may be a setting or settings that is causing problems with this code.
|
|
inherit
namaste
197894
0
Nov 15, 2013 13:06:18 GMT -8
Jaguar
Fear does not stop death. It stops life.
7,151
August 2013
sugilite
|
Post by Jaguar on Oct 1, 2013 7:05:43 GMT -8
Yup got it, thanks.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Oct 1, 2013 7:26:50 GMT -8
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Oct 1, 2013 7:52:47 GMT -8
@ blc@ JaguarThis is only FYI to show my settigs at Photobucket for hosting image links: I copy/paste the url from Direct: which that link does not have ~original at the end. Right now I have the Falling Leaves code w/Photobucket hosting those leafs on my test site: test sitewith no problems at all. You may want to take a look at your settings at Photobucket to see if there may be a setting or settings that is causing problems with this code. I'm not sure what that 'rotate' images is. i'll have to experiment with my test site, since i need the ~original on some of my images for the background purposes. I don;t want to take that away and have my backgrounds not work. Also the option for the ~original is located elsewhere.
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Oct 1, 2013 8:27:16 GMT -8
When posting code you need to use the [code] tag jrryan, what you just posted is of no use to me or anyone who would try to copy it. See how parts of that code is italicized, that's because Proboards is interpreting something in it as being BBCode for [i] meaning who ever copies or inspects that code from your post will be missing parts that have been erroneously interpreted. The parts that I can see tells me that code is super old since it is operating in a world where there were basically two browsers: Netscape and IE. The way it is testing if you're running the shiny new sate-of-the-art Netscape 6 is by checking if it has support for getElementById (something all browsers supports nowadays, including IE). It is therefore making assumptions that no longer apply in today's world but I cannot pinpoint where that that erroneous assumption propagates into the calculations if I only have part of the code. Ah, thanks. The one i got in pm was partially italicized. I wondered about that. Now I know to watch for that.
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Oct 1, 2013 8:34:32 GMT -8
@ blc@ JaguarThis is only FYI to show my settigs at Photobucket for hosting image links: I copy/paste the url from Direct: which that link does not have ~original at the end. Right now I have the Falling Leaves code w/Photobucket hosting those leafs on my test site: test sitewith no problems at all. You may want to take a look at your settings at Photobucket to see if there may be a setting or settings that is causing problems with this code. I'm not sure what that 'rotate' images is. i'll have to experiment with my test site, since i need the ~original on some of my images for the background purposes. I don;t want to take that away and have my backgrounds not work. Also the option for the ~original is located elsewhere. Couple of things. I did switch away from the ~original. I need to use that for uploading background images, but once uploaded I can switch back it seems and have the backgrounds still work. The second thing is that the leaves show for me now with photobucket HOWEVER, for whatever reason, they don't all display. I checked your link, and they don't all display for you either. in fact, when I checked your link, two of leaves were not represented. The small brown aspen leaf and the sycamore. The large yellow and the bigger brown one. The maple leaf showed and the two green ones. I refreshed my test site and again only 5 showed, but it seems to alternate between which one gets left out. weird. Just refreshed your page and now 5 show, no aspen again though.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Oct 1, 2013 8:39:17 GMT -8
Is there any way I could have this show up for only members? Hello Baller95Not that I'm aware of, however, one can Create a Plugin from Build > Settings > Components > Main and from there, copy/paste the code in the Header > Save Changes. To Manage that plugin > Edit: and from there just select Members & Staff the click Done.
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Oct 1, 2013 8:45:33 GMT -8
Is there any way I could have this show up for only members? Hello Baller95Not that I'm aware of, however, one can Create a Plugin from Build > Settings > Components > Main and from there, copy/paste the code in the Header > Save Changes. To Manage that plugin > Edit: and from there just select Members & Staff the click Done. If one does that and makes the plug in, can they use the plug in instead and remove the other code from the header?
|
|
inherit
196452
0
Nov 1, 2013 7:40:31 GMT -8
Baller95
What's for dinner?: Food
1,771
July 2013
baller95
|
Post by Baller95 on Oct 1, 2013 8:52:23 GMT -8
Is there any way I could have this show up for only members? Hello Baller95Not that I'm aware of, however, one can Create a Plugin from Build > Settings > Components > Main and from there, copy/paste the code in the Header > Save Changes. Works like a charm! Thanks buddy
|
|
inherit
196452
0
Nov 1, 2013 7:40:31 GMT -8
Baller95
What's for dinner?: Food
1,771
July 2013
baller95
|
Post by Baller95 on Oct 1, 2013 8:54:26 GMT -8
If one does that and makes the plug in, can they use the plug in instead and remove the other code from the header? You sure can!
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Oct 1, 2013 9:00:15 GMT -8
If one does that and makes the plug in, can they use the plug in instead and remove the other code from the header? You sure can! I just did it. Thanks Army! Does this mean we can change the images shown seasonally if we want via the plug in?
|
|