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 11, 2013 4:48:33 GMT -8
Thanks jrryan, I'm glad all is working well!
|
|
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 11, 2013 6:31:36 GMT -8
jrryan, Moving gifs should be fine, I did notice the scroll bar moving with some images sometimes, I'm not sure why it does that though. I've only noticed it in IE as well but it doesn't affect anything else does it?
|
|
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 11, 2013 17:55:02 GMT -8
jrryan, you're right, a lot of people do use IE and aren't as tech savy as we are. As long as it's not causing any other problem it should be ok but I guess it's a bit annoying having the scroll bar moving around
|
|
inherit
198412
0
May 26, 2022 8:09:32 GMT -8
Timebomb007
450
August 2013
timebomb007
|
Post by Timebomb007 on Oct 11, 2013 18:26:12 GMT -8
The below code works best for me. Images don't start paused in the top left, like it does with the plugin. Images still fall at the same rate when scrolling, unlike with the plugin when using Firefox. Plus, images don't go upward when scrolling up, like with the plugin does in Firefox. However, it might be the reason why a script error occurs in Internet Explorer 8: support.proboards.com/post/5568400/threadAs well, there's members who want to opt out of falling images, and using the only code I was given for hiding from groups, it causes a space between the banner ad and "Register to See the Entire Forum box" that I have on my forum, due to <xmp>. support.proboards.com/thread/486388/remove-white-space <script type="text/javascript">
/****************************************** * Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html) * Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code * Last updated Nov 9th, 05' by DD. This notice must stay intact for use ******************************************/
//Configure below to change URL path to the snow image var snowsrc = "1.gif"; // Configure below to change number of snow to render var no = 10; // Configure whether snow should disappear after x seconds (0=never): var hidesnowtime = 0; // Configure how much snow should drop down before fading ("windowheight" or "pageheight") var snowdistance = "pageheight";
///////////Stop Config//////////////////////////////////
var ie4up = (document.all) ? 1 : 0; var ns6up = (document.getElementById && !document.all) ? 1 : 0;
function iecompattest() { return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body }
var dx, xp, yp; // coordinate and position variables var am, stx, sty; // amplitude and step variables var i, doc_width = 800, doc_height = 600;
if (ns6up) { doc_width = self.innerWidth; doc_height = self.innerHeight; } else if (ie4up) { doc_width = iecompattest().clientWidth; doc_height = iecompattest().clientHeight; }
dx = new Array(); xp = new Array(); yp = new Array(); am = new Array(); stx = new Array(); sty = new Array(); //snowsrc = (snowsrc.indexOf("dynamicdrive.com") != -1) ? "snow.gif" : snowsrc for (i = 0; i < no; ++i) { dx[i] = 0; // set coordinate variables xp[i] = Math.random() * (doc_width - 50); // set position variables yp[i] = Math.random() * doc_height; am[i] = Math.random() * 20; // set amplitude variables stx[i] = 0.02 + Math.random() / 10; // set step variables sty[i] = 0.7 + Math.random(); // set step variables if (ie4up || ns6up) { if (i == 0) { document.write("<div id=\"dot" + i + "\" style=\"POSITION: absolute; Z-INDEX: " + i + "; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><a href=\"http://dynamicdrive.com\"><img src='" + snowsrc.replace(/\d\.gif$/,(parseInt(Math.random()*5+1)+".gif")) + "' border=\"0\"><\/a><\/div>"); } else { document.write("<div id=\"dot" + i + "\" style=\"POSITION: absolute; Z-INDEX: " + i + "; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='" + snowsrc.replace(/\d\.gif$/,(parseInt(Math.random()*5+1)+".gif")) + "' border=\"0\"><\/div>"); } } }
function snowIE_NS6() { // IE and NS6 main animation function doc_width = ns6up ? window.innerWidth - 10 : iecompattest().clientWidth - 10; doc_height = $(document).height() for (i = 0; i < no; ++i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height - 60) { xp[i] = Math.random() * (doc_width - am[i] - 60); yp[i] = 0; stx[i] = 0.02 + Math.random() / 10; sty[i] = 0.7 + Math.random(); } dx[i] += stx[i]; document.getElementById("dot" + i).style.top = yp[i] + "px"; document.getElementById("dot" + i).style.left = xp[i] + am[i] * Math.sin(dx[i]) + "px"; } snowtimer = setTimeout(snowIE_NS6, 10); }
function hidesnow() { if (window.snowtimer) clearTimeout(snowtimer) for (i = 0; i < no; i++) document.getElementById("dot" + i).style.visibility = "hidden" }
if (ie4up || ns6up) { snowIE_NS6(); if (hidesnowtime > 0) setTimeout("hidesnow()", hidesnowtime * 90) }
</script>
|
|
inherit
raine784@gmail.com
195250
0
Jan 14, 2015 13:24:37 GMT -8
pixiedust12
169
June 2013
pixiedust12
|
Post by pixiedust12 on Oct 12, 2013 8:05:49 GMT -8
I am having trouble getting this to work, I admit I am not real tech savvy
|
|
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 12, 2013 9:31:30 GMT -8
jrryan, I didn't modify the height and width settings. I really didn't do anything to the original code aRMY83 posted other than putting it together as a plugin. Perhaps Tim Camara may know? I understand Tim's a busy guy so no worries if there's nothing you can do. pixiedust12, what have you done so far?
|
|
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 12, 2013 12:27:02 GMT -8
Interesting, jrryan, does that code only accept 1 image?
|
|
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 13, 2013 7:53:42 GMT -8
jrryan, I was going to try resizing the images to no more than 42 or 43px but you've already tested it with no success. It's very strange how some themes do it and others don't. The only differences are the images so the images can be the only factor?!
|
|
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 13, 2013 12:38:21 GMT -8
jrryan, I'm not quite understanding you when you say it jumps. I can see the bottom scroll bar moving around in IE sometimes.
|
|
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,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 13, 2013 13:37:08 GMT -8
Baller95Baller could you do one thing? Put all of your leaf images in with the one leaf I resized to 42px in the default link and try it on your computer on IE? reason I say this is because my internet speed is a little slow right now and that may have had an effect on my test? If it jumps for you on the default link with all the images at 42px or less then we know for sure it's got to be another variable? As I mentioned in the other thread, the problem with IE may be deeper than with other browsers because it does not specify a buffer zone so that the images don't float off the right side of the screen thus causing scroll bars to appear then disappears once the image comes back into view causing a "jump" effect. I'll try to illustrate the problem... That green zone on the right would be a buffer zone that the code creates and uses to detect when an image is about to go off screen and in the code used by this plugin that is defined on this line WinWidth=(ns||ns6)?window.innerWidth-70:window.document.body.clientWidth; As you can see it is subtracting 70 from the innerWidth to create that buffer zone that I've colored as green in my illustration. That's all good and fine if the image can fit within that zone but if the image is too large and even the slightest part of that image ends up off screen before it is fully inside that zone then the browser has to create scroll bars at the bottom in order to allow viewing of the part that is off screen. If there is a vertical scroll bar (to scroll up and down) on the right then that takes space away from that green area meaning the images will need to be even smaller in order to fit in that buffer zone without going off screen. You'll also notice that no buffer zone is created for IE (no clientWidth-70 for example) like it is for other browsers (innerWidth) so a good place to start is by subtracting something from there as well (clientWidth does not include the width of a scroll bar if it exists like innerWidth does so no need to account for that)
|
|
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,017
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Oct 13, 2013 14:18:54 GMT -8
ChrisOk I understand this and even the code you changed for me via PM sometimes will jump just once here and there and it is exactly as you say when a image goes past the side. When they drop and don't do that the jumping ceases. So what is the answer Eton for IE users? Is it simply put in a lot smaller images or can the buffer zone be changed to make it have more room? I mean it's like I said many people use IE 10 like me because it's what you get when you buy a lot of computers now? I don't recall making any other changes to that code I sent in PM other than making it able to accept multiple images as you were obviously trying to accomplish and increasing the buffer zone to 60 (I don't recall ,it was maybe 40 to begin with) and I did show the lines where that change was made in one of my previous reply as well so it would be a simple case of increasing the number. As for the other code I placed a line of code in a [code] showing exactly where that zone is created (and not create in the case of IE) with a simple number that could be increased as well as modified to add support for a zone in IE The last paragraph in my last reply gives a starting point since I mention that the code DOES NOT CREATE A BUFFER ZONE for the IE browser like it does for other browsers. I do not have IE10 because I've got a special build with a few toys that I do not wish to lose so that is something you would need to test on your own.
|
|
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 14, 2013 8:56:07 GMT -8
Haha yeah I hear you jrryan! Does that code have fall speed and image amount setting by any chance? Perhaps Chris may know.
|
|
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 15, 2013 8:30:28 GMT -8
Ah yeah gotcha, thanks for clarifying jrryan
|
|
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 15, 2013 12:11:32 GMT -8
Oh I see jrryan! I've just had a look on your forum on my iPad and I noticed that the leaves starts right at the top of the page and goes right to the bottom before looping whereas the code aRMY posted loops when the leaves fall out of the screen. Also, there doesn't seem to be a setting for image fall speed? I wish the code I used in my plugin could have a fix for the jumping but to make a new plugin using the code you're using seems confusing.
|
|
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 16, 2013 7:54:40 GMT -8
|
|