Author |
Topic |
NiteOwl
Junior Member
Canada
403 Posts |
Posted - 27 December 2005 : 08:20:31
|
Merry Christmas all - And a safe new Year.< |
-=NiteOwl=-
|
|
|
TonyB7
Junior Member
USA
267 Posts |
Posted - 27 December 2005 : 21:49:48
|
Interesting. I wonder why this one includes a link on some flakes? Also, this one cuts off near the top of the screen on Active Topics as apparently it thinks that's the bottom of the page.< |
|
|
Classicmotorcycling
Development Team Leader
Australia
2084 Posts |
Posted - 27 December 2005 : 23:30:02
|
I had removed it from the site after NiteOwl got it working on his site as it is not really the thing to use on the site I put it on. Still never had the issue with it cutting off on some pages. < |
Cheers, David Greening |
|
|
TonyB7
Junior Member
USA
267 Posts |
Posted - 02 January 2006 : 07:11:22
|
I see there was a 'windowheight' option to get the snow to fall a full page.
This has proven so wildly popular at my forum I just have to ask:
1) When a flake gets near the right edge it causes horizontal scroll bar flashing. I tried changing xp[i] = Math.random()*(doc_width-80); // set position variables to -80 so far and it helps, but is there a better way to stop this?
2) It would sure be nice if there were more than one flake. Again, the 3-flake script wouldn't work in Firefox.< |
|
|
Sonic
New Member
Germany
82 Posts |
Posted - 02 January 2006 : 15:54:43
|
here is the rewritten code working on firefox too -->var snowsrc="";
var snowsrc1="../img/snow/snow1.gif";
var snowsrc2="../img/snow/snow2.gif";
var snowsrc3="../img/snow/snow3.gif";
var no = 10; // change number of snow
var speed = 30; // smaller number moves the snow faster
var ie4up = (document.all) ? 1 : 0;
var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
var dx, xp, yp;
var am, stx, sty;
var i, doc_width = 800, doc_height = 800;
if (ns6up) {
doc_width = self.innerWidth;
doc_height = self.innerHeight;
} else if (ie4up) {
doc_width = document.body.clientWidth;
doc_height = document.body.clientHeight;
}
dx = new Array();
xp = new Array();
yp = new Array();
am = new Array();
stx = new Array();
sty = new Array();
for (i = 0; i < no; ++ i) {
snowsrc = eval("snowsrc"+RanSpan(1,3));
dx[i] = 0;
xp[i] = Math.random()*(doc_width-10);
yp[i] = Math.random()*doc_height;
am[i] = Math.random()*20;
stx[i] = 0.02 + Math.random()/10;
sty[i] = 0.7 + Math.random();
if (ie4up||ns6up) {
document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: 15px; LEFT: 15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
}
}
function snowIE_NS6() {
doc_width = ns6up?window.innerWidth : document.body.clientWidth;
doc_height = ns6up?window.innerHeight : document.body.clientHeight;
for (i = 0; i < no; ++ i) {
yp[i] += sty[i];
if (yp[i] > doc_height) {
xp[i] = Math.random()*(doc_width-am[i]-10);
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";
}
setTimeout("snowIE_NS6()", speed);
}
function Random(N) {
return Math.floor(N*(Math.random()%1))
}
function RanSpan(MinV, MaxV) {
return MinV + Random(MaxV-MinV+1)
}
if (ie4up||ns6up){
snowIE_NS6();
} < |
ich finds genial... bei uns ist es ratzekuz dunkel und bei dene alle heller nachmittag |
|
|
TonyB7
Junior Member
USA
267 Posts |
Posted - 02 January 2006 : 17:09:35
|
I dunno. This one is generating both horizontal and vertical scroll bars. Is there a way to keep the flakes in-bounds?< |
|
|
keng38
New Member
United Kingdom
80 Posts |
Posted - 30 November 2006 : 05:45:13
|
I have used the JS code given by sonic above (2nd Jan)and it works a treat. One thing I did miss was to remove the & _ from the line
"<body" & strTmpPageBGImageURL & " bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine < |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 01 December 2006 : 12:26:28
|
This code cripples my member's ability to edit avatars:
Microsoft VBScript compilation error '800a0411'
Name redefined
/bbs/inc_header.asp, line 370
Dim MyWeekday ----^< |
This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums! |
Edited by - CalloftheHauntedMaster on 01 December 2006 13:34:01 |
|
|
JJenson
Advanced Member
USA
2121 Posts |
Posted - 02 December 2006 : 11:22:27
|
Ok i have been reading this thread and made all the changes minus doing the 3 flaks I did the one David showed on here. Two things I get on this. All my flakes fall in one line on the left side. and I get the IE warning that this page contains secure and non secure items do you want to continue. Is there a way to get around this? you can take a look at
www.thebragboard.com/other/forum1
Thanks < |
|
|
Sonic
New Member
Germany
82 Posts |
Posted - 05 December 2006 : 17:55:49
|
use the code posted at - 02 January 2006 : 15:54:43 and it should work fine :-)< |
ich finds genial... bei uns ist es ratzekuz dunkel und bei dene alle heller nachmittag |
|
|
JJenson
Advanced Member
USA
2121 Posts |
Posted - 05 December 2006 : 18:23:12
|
Thanks Sonic. I thought that was only if you wanted 3 snowflakes i guess I should read a little better. Working now except I can't control the height and width with those controls for some reason.
Thanks Jeff< |
|
|
Simko
Starting Member
25 Posts |
Posted - 08 December 2006 : 11:38:15
|
Hmmm, always got that error:
Microsoft VBScript compilation Error "800a03ea'
Syntax error
/en/forum/inc_header.asp, line 307
Dim MyWeekday ^
Saved Sonics Code to snow.js, uploaded it to the server, also uploaded 3 snowflakes, added this code:
Dim MyWeekday MyWeekday = DatePart("ww", date) if (MyWeekday > 47 and MyWeekday < 54) or (MyWeekday > 0 and MyWeekday < 10) then Response.Write "<script language=""JavaScript1.2"" src=""snow.js"" type=""text/javascript""></script>" & vbNewLine end If
Anyone?< |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 08 December 2006 : 11:59:45
|
I didn't use Sonic's code so I can't help with that. However, if you use classicmotor's code, it'll look like this and work correctly:
<%
response.write "-->" & vbNewLine
response.write "</style>" & vbNewLine & _
"</head>" & vbNewLine & _
vbNewLine & _
"<body background=img/bg.gif bottomMargin=""0"" leftMargin=""0"" topMargin=""0"" rightMargin=""0"" marginwidth=""0"" marginheight=""0"" bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine
Response.Write "<script language=""JavaScript1.2"" src=""snow.js"" type=""text/javascript""></script>" & vbNewLine
end If
Response.Write "<a name=""top""></a>" & vbNewLine & _
vbNewLine & _
%> < |
This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums! |
Edited by - CalloftheHauntedMaster on 08 December 2006 12:00:24 |
|
|
Simko
Starting Member
25 Posts |
Posted - 08 December 2006 : 14:46:49
|
Ah, thanks a lot! Now it works :)< |
|
|
CalloftheHauntedMaster
Junior Member
289 Posts |
Posted - 08 December 2006 : 14:54:09
|
Glad to help. However, be sure to check out your avatars. This causes problems with Zuel's addon.< |
This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums! |
|
|
Topic |
|