Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Dec 2002
    Location
    UK
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is it possible to make a sound file start at a certain time..

    oke i want a sound file to start playing 20 seconds after the page has loaded.. is that possible? or do i have to alter the sound file.. because that could be a hard option.
    .wishes.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Well, starting muzik without permission is really a bad idea...It makes people leave immediately unless that's the point.

    I would guess it involves a timeout onload function which would be found in the javascript forum.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #3
    New Coder
    Join Date
    Dec 2002
    Location
    UK
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    haha there will be only 1 visitor to this site as it is being built as a auto run on ONE cd haha.. an yea they wont leave cus um i know them well an they wont leave haha..
    .wishes.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    here's an answer

    Code this into the html page, within the head tag -
    <script language="JavaScript">
    var howManySeconds = 10
    function pause() {
    myTimer=setTimeout("whatToDo()",howManySeconds*1000)
    }

    function whatToDo() {
    //-- This example just pops a message up on the screen.
    //-- But you can write your own code inside this whatToDo()
    //-- function to play music.
    alert ("This is when the music would start to play when you have coded it of course!")
    }
    //--></script>

    In the body tag do this, <body onload="pause()">
    Therapy is expensive, popping bubble wrap is cheap, you choose.

  • #5
    New Coder
    Join Date
    Oct 2002
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What about this...

    I have an animated gif that has some stars starting as dots and expanding into 70 x 70 stars.

    I'd like a very short "popping" sound file to play as each one finishes.

    Any ideas? Besides don't do it!

    Thanx

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Probably a few ways to do this...One would be to make a flash movie with the sound accompanying the graphic.

    Flash movie:

    animation1
    sound
    animation2
    sound
    animation3
    sound
    etc.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    skippy,
    you could just make a function that plays your sound file and at the end of the function that does the stars call it.
    USA


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •