a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

audio file to play once

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Microsoft FrontPage Help >> audio file to play once
Page: [1]
 
womynaloud

 

Posts: 142
Joined: 1/17/2002
From: Ponca City Oklahoma USA
Status: offline

 
audio file to play once - 12/30/2004 9:52:34   
Hey guys,

I hate background audio as much as anyone, but I've got a client who wants a short (like 5 or 6 sec) clip to play when you go to their site. That I can do, but there has to be a way to get it to only play one time when you 1st go to their home page, and then not play again. Kind of like the pop up code Thomas has in tutorials, where it sets a cookie and you can specify how many days until the pop up happens again, but I have no idea how to do that with an audio file.

Thanks for the help,

Gayle

_____________________________

The box said "requires windows 98 or better" so I installed Linux!
Giomanach

 

Posts: 6136
Joined: 11/19/2003
From: England
Status: offline

 
RE: audio file to play once - 12/30/2004 10:13:22   
Hi Gayle

What's the coding your using the play the sound?

<bgsound src="file.mid" loop="false">

<embed src="file.mid" hidden="true" autostart="true" loop="false"></embed>

Dan

_____________________________




(in reply to womynaloud)
womynaloud

 

Posts: 142
Joined: 1/17/2002
From: Ponca City Oklahoma USA
Status: offline

 
RE: audio file to play once - 12/30/2004 10:23:36   
yeah. it's an mp3 file, and sounds fine. i just don't want to hear it everytime i open the page! :)

_____________________________

The box said "requires windows 98 or better" so I installed Linux!

(in reply to Giomanach)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: audio file to play once - 12/30/2004 10:39:32   
if you only want it to open the first time you open the page and not when you return, I dont think Dan's code will do that. Dan's code will stop it fron looping and only play one time but it will play each time you open the page. I think your solution would be a cookie and javascript. at least that would be ione solution

_____________________________

Dan

(in reply to womynaloud)
womynaloud

 

Posts: 142
Joined: 1/17/2002
From: Ponca City Oklahoma USA
Status: offline

 
RE: audio file to play once - 12/30/2004 10:43:38   
That's what I figured, dan. I'm just not sure how to write the script. So far, I've been able to convince clients that bdgrnd music is a bad thing, but this is a furniture store website, and he wants his jingle to play when you go to the page. I'm just hoping I can convince him that playing it once a day (using a cookie) is enough.

_____________________________

The box said "requires windows 98 or better" so I installed Linux!

(in reply to dpf)
dpf

 

Posts: 7126
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: audio file to play once - 12/30/2004 11:20:15   
basically, what you would do is not have the code embedded in html.. instead, your js would check to see if there is a cookie present, if there is- it releases to the html page which has no sound embedded.

if no cookie is present, the js does 2 things:
1. write a cookie
2. use document.write to write the html to add the sound file and play it only once as dans code shows

_____________________________

Dan

(in reply to womynaloud)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> Microsoft FrontPage Help >> audio file to play once
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts