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 4, 2013 16:23:23 GMT -8
I just tried Baller95 's plug in and it jumps too. Can you please show me the code that works and doesn't jump/get that scroll bar? Thanks There is NO CODE that doesn't jump once you input an image that is a size it DOES NOT EXPECT, which is what I was saying. Both codes would need to be modified in order to EITHER accept a size value in addition to just an image or preload the images then use the largest of the detected size in its calculations. Is that a bit clearer? *if you look at the code jrryan just posted you'll see it is calibrated for an image size of 60px maximum, were you to change it to an image larger than that you start getting jumps
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Oct 4, 2013 16:40:41 GMT -8
blcHere was the bad code that Eton fixed give it a try. thanks, you too ChrisI don't know how I managed to miss that one! That's only going to allow for one type of image thought right? Like one type of snowflake or one type of bat? Still its a good one to have for those type of needs. Again thanks, both of you.
|
|
inherit
194160
0
Mar 23, 2015 9:54:45 GMT -8
blc
2,641
May 2013
blc
|
Post by blc on Oct 4, 2013 16:41:54 GMT -8
I just tried Baller95 's plug in and it jumps too. Can you please show me the code that works and doesn't jump/get that scroll bar? Thanks There is NO CODE that doesn't jump once you input an image that is a size it DOES NOT EXPECT, which is what I was saying. Both codes would need to be modified in order to EITHER accept a size value in addition to just an image or preload the images then use the largest of the detected size in its calculations. Is that a bit clearer? *if you look at the code jrryan just posted you'll see it is calibrated for an image size of 60px maximum, were you to change it to an image larger than that you start getting jumps Ok. That's better, yes and thanks!
|
|
inherit
193844
0
May 19, 2015 5:01:45 GMT -8
Sassy
I love you Shaggy!
2,372
May 2013
sassylisa14
|
Post by Sassy on Oct 5, 2013 5:48:31 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!
This is absolutely fabulous, thank you so much. Now funny the code on page 1 didn't work, but this one does.
Beautiful! Worked like a charm! I was just surfing about, checking out other threads here at Support and saw this and thought I'd try it. Didn't know where to put it, so I just stuck it in my global header and bingo! Falling leaves! It's perfect and thank you.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Oct 5, 2013 6:26:23 GMT -8
Hello SassyGlad it works for you. However... you may want to go over here: Falling Images by Baller95for this new plugin that basically does the same, but much, much more!
|
|
inherit
193844
0
May 19, 2015 5:01:45 GMT -8
Sassy
I love you Shaggy!
2,372
May 2013
sassylisa14
|
Post by Sassy on Oct 5, 2013 6:30:30 GMT -8
Thank you aRMY83 ... So if I download that plug-in .. I will still have the falling leaves?
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Oct 5, 2013 6:36:43 GMT -8
It comes with preset images for Autumn/Fall & Winter (images included in plugin).
|
|
inherit
193844
0
May 19, 2015 5:01:45 GMT -8
Sassy
I love you Shaggy!
2,372
May 2013
sassylisa14
|
Post by Sassy on Oct 5, 2013 6:44:57 GMT -8
Thank you very much!
|
|
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 5, 2013 7:17:36 GMT -8
Hey aRMY83, thanks for pointing Sassy to the plugin Sassy, let me know how it works. Remember to take the code out of the main/global header first.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Oct 5, 2013 7:44:21 GMT -8
Hello Baller95Not a problem at all. It's a great plugin!
|
|
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 5, 2013 7:59:58 GMT -8
Thanks aRMY83, I'm glad you like it!
|
|
inherit
193844
0
May 19, 2015 5:01:45 GMT -8
Sassy
I love you Shaggy!
2,372
May 2013
sassylisa14
|
Post by Sassy on Oct 5, 2013 12:41:34 GMT -8
Hey aRMY83, thanks for pointing Sassy to the plugin Sassy, let me know how it works. Remember to take the code out of the main/global header first. It's an excellent plug-in and KUDOS to you for it! and thank you!!! I did notice though and I don't know if this has anything to do with the plug-in or not, but my message area, became bigger, and the avatars in the forum, became smaller, LOLOL I was just checking about and I don't see why that happened at all .. and if someone could tell me why, I'd greatly appreciate it ... but .... I do LOVE the fall leaves .. and I love this time of perfect .. so the plug-in is a perfect fit!
|
|
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 5, 2013 13:17:53 GMT -8
Sassy I'm glad you like it! I hope the plugin isn't causing the issue, it shouldn't do anything like that anyways. Did you add any other plugins recently?
|
|
inherit
193844
0
May 19, 2015 5:01:45 GMT -8
Sassy
I love you Shaggy!
2,372
May 2013
sassylisa14
|
Post by Sassy on Oct 5, 2013 15:12:25 GMT -8
Nope my dear, that's the only plug-in I've added in ages. I just found it weird that all the avatars became smaller in size and the message box, became larger, lol
|
|
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 5, 2013 18:08:15 GMT -8
Nope my dear, that's the only plug-in I've added in ages. I just found it weird that all the avatars became smaller in size and the message box, became larger, lol That's very strange indeed! Maybe post about it in support and they'll help
|
|