• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Net Page Problem

#1


View the web page yourself you should see snow flakes falling and also hear music but I can't get either to work as you can see from the pic. Please help! Thanks in advance.
 

Khayman

I'm sorry Hal...
Political User
#5
I got both the music and snow on IE, but i don't have flash (or shockwave or something) in Firefox, so it didn't show there
 
L

Lee

Guest
#7
Does you host allow you to do the things you want to do. My daughters won't let hers have images that are animated, as it's not part fo the free package i think.

Try things below.




<script language='JavaScript1.2'>
<!--

// set browser compatibility variables
var isNS4 = (document.layers) ? 1 : 0;
var isIE4 = (document.all) ? 1 : 0;

// set snowflake image and number variables
var snowFlakeImage='yoursnowflake.gif';
var numFlakes = 10;

// set body height and width variables
var bodyWidth, bodyHeight;

function setBodyDimensions()
{
if (isNS4)
{
bodyWidth= self.innerWidth;
bodyHeight= self.innerHeight;
} else if (isIE4) {
bodyWidth= document.body.clientWidth;
bodyHeight= document.body.clientHeight;
}
}

// draw snowflakes and set coordinates for each
var i = 0;
var xRelative = new Array();
var xLoc = new Array();
var yLoc = new Array();
var xAmplitude = new Array();
var xStep = new Array();
var yStep = new Array();

setBodyDimensions();

for (i = 0; i < numFlakes; ++ i)
{
xRelative = 0;
xAmplitude = Math.random()*12;
xStep = 0.03 + Math.random()/10;
yStep = 0.67 + Math.random();

xLoc = Math.random()*(bodyWidth-50);
yLoc = Math.random()*bodyHeight;
if (isNS4)
{
document.write("<layer name=\"flake"+ i +"\" left=0 top=0 visibility=show><img src='"+ snowFlakeImage +"'></layer>");
} else if (isIE4) {
document.write("<div id=\"flake"+ i +"\" style=\"position:absolute; z-index:20; visibility:visible; top:0px; left:0px;\"><img src='"+ snowFlakeImage +"'></div>");
}
}

function snowFall()
{
for (i = 0; i < numFlakes; ++ i)
{
yLoc += yStep;
if (yLoc > bodyHeight-10)
{
xStep = 0.03 + Math.random()/10;
yStep = 0.67 + Math.random();
xLoc = Math.random() * (bodyWidth-xAmplitude-20);
yLoc = 0;
setBodyDimensions();
}

xRelative += xStep;

if (isNS4)
{
document.layers['flake'+i].top = yLoc;
document.layers['flake'+i].left = xLoc + xAmplitude * Math.sin(xRelative);
} else if (isIE4) {
document.all['flake'+i].style.pixelTop = yLoc;
document.all['flake'+i].style.pixelLeft = xLoc + xAmplitude * Math.sin(xRelative);
}
}

setTimeout('snowFall()', 10);
}

if (isNS4 || isIE4)
{
snowFall();
}

//-->
</script>


goes between <head></head> make sure you see where I typed in ''yoursnowflake.gif you type it in to the route and name of yours at your web, example: images/snowflake.gif

Sound well, try this below.

<HTML>
<HEAD>

<SCRIPT Language="JavaScript">

function playEnterSound(){
if (navigator.appName == 'Netscape')
window.location = 'yoursound.wav';
else
document.all.soundfile.src='yoursound.wav';
}
//-->
</SCRIPT>

</HEAD>
<BODY onLoad="playEnterSound()" >

<BGSOUND SRC="" ID="soundfile">


</BODY></HTML>
 

Members online

No members online now.

Latest posts

Latest profile posts

Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,016
Latest member
doertilog