Net Page Problem

Discussion in 'Web Design & Coding' started by Ci2e, Jun 6, 2004.

  1. Ci2e

    Ci2e XPert

    Messages:
    277
    [​IMG]

    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.
     
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    Ehm.. What's the site URI ?
     
  3. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
  4. sean.ferguson

    sean.ferguson Moderator Folding Team

    Messages:
    1,693
    Location:
    Fife; Scotland
    nope the .mid loads but there is no sound... and no snowflakes... there was no errors in my 'activity viewer' so i have no idea
     
  5. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    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
     
  6. Ci2e

    Ci2e XPert

    Messages:
    277
    This really sucks cause I can't figure it out.
     
  7. Lee

    Lee OSNN Proxy

    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[i];
    document.all['flake'+i].style.pixelLeft = xLoc[i] + xAmplitude[i] * Math.sin(xRelative[i]);
    }
    }

    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>[/i][/i][/i][/i]
     
  8. Ci2e

    Ci2e XPert

    Messages:
    277
    so I should tell the one who made the website all that
     
  9. Ci2e

    Ci2e XPert

    Messages:
    277
    Who do I tell to try that?
     
  10. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    :confused:

    Whoever made the web-site.
     
  11. PseudoKiller

    PseudoKiller Zug Zug

    Messages:
    3,858
    Location:
    Ice Crown Citadel
    ~Thread Moved
     
  12. Ci2e

    Ci2e XPert

    Messages:
    277
    ok thanks- i'll have him give it a try...