...

View Full Version : Newbie: Sound Delay Issue



DennisR
03-09-2005, 06:52 PM
Hey all,

Trying to get a background music to play at a 5 second delay but it kept playing almost immediately. The page also has a non-looping flash animation and is in a frameset (mainFrame). What I want to accomplish is to have the flash play, then have the background song start after, thus the delay. There's really nothing much to the code but I can't get the darn thing to work. Here it is (done in DreamWeaver):

<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">


<TITLE>door</TITLE>
<bgsound SRC="../sounds/intro.mp3" DELAY="10">
</HEAD>
<BODY bgcolor="#000099">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--E N T E R--><OBJECT classid="clsid: D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="850" HEIGHT="410" id="door" ALIGN="">
<PARAM NAME=movie VALUE="door.swf"> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=best> <PARAM NAME=scale VALUE=noscale> <PARAM NAME=devicefont VALUE=true> <PARAM NAME=bgcolor VALUE=#000099> <EMBED src="door.swf" loop=false menu=false quality=best scale=noscale devicefont=true bgcolor=#000099 WIDTH="850" HEIGHT="410" NAME="door" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>

</BODY>

Thanks a bunch.

-Dennis

mcdougals4all
03-09-2005, 11:31 PM
Ugh...

A Flash animation, background music, and a frameset.

No offense, but I don't think anyone's touched this because it's pretty far removed from the type of coding practices that are typically discussed and promoted here.

The best advice I can offer is to try searching the multimedia or javascript forums for better ways to deliver your audio file.

_Aerospace_Eng_
03-09-2005, 11:50 PM
is it really neccessary for the frameset? anyways here is a possible solution

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Delay Sound</title>
<style type="text/css">
#music {
height:0px;
}
</style>
<script type="text/javascript">
window.setTimeout("playsong()",5000);
function playsong(){
document.getElementById('music').innerHTML='<embed src="../sounds/intro.mp3" hidden="true" autostart="true"></embed>';
}
</script>
</head>

<body>
<div id="music"></div>
<object type="application/x-shockwave-flash" data="door.swf" width="850" height="410">
<param name="movie" value="door.swf">
</object>
</body>
</html>

DennisR
03-11-2005, 03:06 AM
Hopefully, y'all saw the word "NEWBIE" in the thread title. Not very well versed with the design rules promoted by this forum. I am just scratching the CSS surface. And all this time, I've been using Frontpage and Dreamweaver, sorry if I'm not a hardcore coder like you guys. I was trying to help my sister's band design their website. Neither one of them even know HTML, let alone CSS, scripts, etc. The website does look pretty good for someone with my limited knowledge and yes I'm going to learn more. I just need help with this so please limit the flaming. Thanks for the help.


is it really neccessary for the frameset? anyways here is a possible solution

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Delay Sound</title>
<style type="text/css">
#music {
height:0px;
}
</style>
<script type="text/javascript">
window.setTimeout("playsong()",5000);
function playsong(){
document.getElementById('music').innerHTML='<embed src="../sounds/intro.mp3" hidden="true" autostart="true"></embed>';
}
</script>
</head>

<body>
<div id="music"></div>
<object type="application/x-shockwave-flash" data="door.swf" width="850" height="410">
<param name="movie" value="door.swf">
</object>
</body>
</html>

mcdougals4all
03-11-2005, 04:14 AM
No one's flaming you.

Your post got several views with no response. Which means the question either wasn't clear, there wasn't enough code to work with, or simliar questions have been asked and answered before.

That's all. :)

DennisR
03-11-2005, 09:41 PM
Sorry if I seemed a little annoyed. I spent an hour searching the forum and couldn't find anything that pertains to my situation. I don't think I can make it any easier to understand. I just want a 5 sec delay on a non-looping background sound inside a mainFrame that has a Flash animation in it. I know that you said that you don't think anyone's touched this because it's pretty far removed from the coding practices. The code I posted initially is the mainFrame of the parent frame. I didn't think that its relevent to even bring up the other frames that make up the parent frame because the sound that I was trying to apply a delay on is in the mainFrame only. The other frames are straight out HTML only, no special effects there. Also, compare that code to a CSS code, makes the whole thing seem like there wasn't enough code to work with. But I am being real when I say that that is the entire code for that frame/page.

_Aerospace_Eng_,

Thanks for your help, I tried your code but it didn't work. As a matter of fact, when I previewed it, all I got was a blank white page. I have zero knowledge on CSS, and I can't even begin to make sense of its codes so I guess I'm s-o-l'd for now. Thanks for the code anyhow, maybe it'll make sense to me in the future.

BTW, I tried to play with a few CSS templates in Dreamweaver and somehow it doesn't let me go on design view, only on code view. Is this the nature of CSS or is this just Dreamweaver? I feel so lost with this whole CSS thing. If anyone can shoot me over to a site that can help someone like me with absolutely zero CSS understanding, I'll be eternally grateful so that I can stop sounding clueless in here.



No one's flaming you.

Your post got several views with no response. Which means the question either wasn't clear, there wasn't enough code to work with, or simliar questions have been asked and answered before.

That's all. :)

mcdougals4all
03-11-2005, 10:10 PM
Hey, it's understandable. :thumbsup:

As for CSS, www.htmldog.com is a good one, and www.w3schools.com too.

If you really want to understand the workings of CSS, get Firefox (http://www.mozilla.org/products/firefox/) and then download the developer's extension (http://chrispederick.com/work/firefox/webdeveloper/). It will allow you to edit the CSS on any page and instantly see the results.

I can't offer any help with Dreamweaver, but there are folks around who use it. Try searching the general web building area.

For your original problem, if you have the page on the web, post a link. It may be easier to figure out what's happening.

DennisR
03-11-2005, 10:37 PM
Gosh, hope I don't embarrass myself with this. Here is the website: www.californiajammin.us . You'll see "ENTER" in white letters. After clicking it, a flash animation will execute with a short sound effect in it. Then I want a background music to start playing a few seconds after.

Thanks for the references, I am reading about CSS right now in the W3Schools website.



Hey, it's understandable. :thumbsup:

As for CSS, www.htmldog.com is a good one, and www.w3schools.com too.

If you really want to understand the workings of CSS, get Firefox (http://www.mozilla.org/products/firefox/) and then download the developer's extension (http://chrispederick.com/work/firefox/webdeveloper/). It will allow you to edit the CSS on any page and instantly see the results.

I can't offer any help with Dreamweaver, but there are folks around who use it. Try searching the general web building area.

For your original problem, if you have the page on the web, post a link. It may be easier to figure out what's happening.

mcdougals4all
03-12-2005, 12:00 AM
It seems to be working as you wanted, is the delay not long enough?

DennisR
03-12-2005, 12:31 AM
Not really, because sometimes, the flash takes a tad longer to load so it throws off the delay by a second or two. Also, when I change the value of the DELAY to 10 seconds for example, it doesn't seem to make a difference at all.

Also, I've been looking around at other websites for rock bands and stuff and some of the big name bands like Pearl Jam, Godsmack, etc. incorporate some pretty heavy splash stuff. I am not going to get into splash just yet. However, is there a nice and neat CSS style that I can use to transform this website? Thanks.


It seems to be working as you wanted, is the delay not long enough?

_Aerospace_Eng_
03-12-2005, 05:03 AM
about that dreamweaver thing, well thats dreamweaver for you, its a template so they really dont want you using the design view, those templates are a little complex so they expect that user knows how to work with the coding view, i guess you could save the template as a total different page out of the main project, and just reopen it, you should be able to see the design view then. About the flash not showing up, that is the same code i use to put my flash on pages, its the up to standards way, and what exactly are u doing with this code?

<frameset rows="68,*" cols="*" framespacing="0" frameborder="NO" border="0" onLoad="MM_checkBrowser(4.0,0,1,5.0,0,2,2,'http://channels.netscape.com/ns/browsers/default.jsp','http://www.microsoft.com/downloads/details.aspx?FamilyID=1e1550cb-5e5d-48f5-b02b-20b602228de6&amp;displaylang=en');MM_checkPlugin('Shockwave Flash','','pages/plugin.htm',true);MM_checkPlugin('Windows Media Player','','http://www.microsoft.com/windows/windowsmedia/download/default.asp?displang=en',true);return document.MM_returnValue">
dont really need to direct users to download windows media player, should play the song on most windows OS, do you have access to the flash source file? Yeah and the reason your flash isn't playing is because its not embedded right, the code i gave you isn't even in the page, and you can't set the delay of a song just the way you have it, IE wont recognized it, and bgsound is an IE only tag, and your flash file isn't where it should be, according to the original code you posted it should be here http://www.californiajammin.us/door.swf so that could also be y it isn't playing



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum