Solved

Playing a sound onload

Posted on 2006-11-03
7
496 Views
Last Modified: 2013-11-18
I can't insert a sound in my page in none of the ways DW-Help describes,
can't although play it inside DW (properties window)- it gives me the
message that DW is unable to find Plug-ins to handle this media typ. It
doesn't neighter play .wav nor .mp3, although a normal mp3 cd is been played
on my pc without any problems.

B.T.W. I want a sound to be played on my homepage(Body onload= ....),
- continual I mean even once the user goes to another page,
- to be played in both PC and apple without need for a plugin
- and have a button "Stop playing sound" - Can't find it in behaviours panel.

Would be greatful for any help,
Sherry
0
Comment
Question by:Shareece
  • 4
  • 2
7 Comments
 
LVL 25

Expert Comment

by:Rouchie
ID: 17867284
Before you do this, just consider the users with a slow connection.  Many people find it annoying browsing while music plays.  Even though you are including a STOP button, the way in which you are adding the sound means it will be downloaded before the user can get a chance to stop it.  This means that the rest of your page might not even appear before the sound has downloaded, meaning the page won't be very popular!

The most common reason the sound won't play is that a codec has been used to save the MP3 file that is not used by IE to play it back.  Not all MP3's are the same, bizarrely enough!  Try saving the file using a common codec, such as LAME.

My advice is to put the sound file inside a flash movie.  This way it will definitely play providing the user has the flash player (about 97% of the internet browsing population).  You could then have a starting page in the movie that says, "Music will play in XX seconds, click here to prevent this..."

...or something to that effect.
0
 

Author Comment

by:Shareece
ID: 17867982
Thanks for the answer.  It is not me, my client wants a sound to be played in the page till the user tells: Stop!

Any way, lets say I put a flash movie with sound in the first page of the website. will the sound be continued playing also once the user navigates to another (pur HTML) page?
thanks
0
 
LVL 25

Accepted Solution

by:
Rouchie earned 500 total points
ID: 17879499
No, unfortunately not.  The sound is delivered from the page, so once the page changes, the sound will stop and then have to restart.  There are 2 ways around this, depending on where your skills lay.

1.  You will need a page that displays constantly, while the other content pages are displaying.  This constant page would hold the sound player.  You would use frames here; one side that holds the constant page, the rest that holds the other pages.  The downside is that frames look a bit untidy.

1b.  You could launch the sound page in a popup using javascript.  This is probably the best approach since the window size can be customized to your exact liking (i.e. the size of a STOP button).  The stop button would actually just simply close the window, which would kill the sound anyway.

2.  You can do the whole site in Flash.  Because flash can contain multiple "child" movies in the same window, you could have the music playing while the user navigated through the other child content movies.

For simplicity, I'd say that 1b is the best approach.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17882468
Hey Rouchie,

Congratulations on making Guru!
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 17882514
Hey wow, I didn't even see that myself!!!

Thanks Jason - although I'm not making any progress on your position!   I can see you celebrating the 1m point mark by this time next year!
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 17882660
Meh.  It took a whole year to get to 400k.  If the new site launches and people are allowed to cross post questions in multiple TA's, our little pool of points will go way down as the HTML, CSS, PHP, and ASP guys get their shot at these Q's.
0
 
LVL 25

Expert Comment

by:Rouchie
ID: 17887325
Cross-post?  I wasn't aware of that.  Yes, sadly that would be right.  

We'll see anyway...
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now