View Full Version : is it possible to make a sound file start at a certain time..
me-so-sleepy
12-13-2002, 10:56 PM
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.
zoobie
12-14-2002, 03:21 AM
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. :rolleyes:
me-so-sleepy
12-14-2002, 11:35 AM
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..
tommysphone
12-16-2002, 10:30 AM
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()">
skippy_421
12-16-2002, 09:36 PM
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
zoobie
12-16-2002, 09:53 PM
Probably a few ways to do this...One would be to make a flash movie with the sound accompanying the graphic. :D
Flash movie:
animation1
sound
animation2
sound
animation3
sound
etc.
landon11
12-16-2002, 10:12 PM
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.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.