Help - Search - Members - Calendar
Full Version: Embedded Sound Files
HTMLHelp Forums > Web Authoring > Web Site Functionality
Linda
I just found this forum and now hope that I can find some help. I'm trying to embed a "play onclick" sound file in a web page. I have tried this a zillion different ways and am unable to get it to work in multiple browsers. I have googled up a storm, but can't find any current "how tos". I can get it to work in IE6, or in Firefox, or occasionally in Netscape, but never ALL of them, which is my goal. Any help would be very much appreciated. wink.gif

Thanks. I hope to learn a lot here.

Linda

www.espritnaples.org - the homepage is where I'm trying to get the file to play on click.
jimlongo
There's a couple of things to look out for.

There are two tags you can use <object> and <embed>. Most browsers now understand object, but even though it's deprecated embed is still useful for (and more extensible for some plug-ins) others. So the reccomended use is and embed tag inside an object tag.

Here's an example for a quicktime file
CODE

<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"  width="320" height="256" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="SRC" value="XXX.mov">
<param name="CONTROLLER" value="TRUE">
<param name="AUTOPLAY" value="TRUE">
<embed
src="XXX.mov"
width="320" height="256"
controller="TRUE"
autoplay="TRUE"
type="video/quicktime"
pluginspage="http://www.apple.com/quicktime/download/">
</embed>
</object>


other files have different classid's to trigger the download of the correct ActiveX component if required.

Which brings me to ActiveX. In the new IE7 any activeX component requiested will cause a warning to be displayed, which must be accepted before the active content can be dispalyed. This may cause many users to avoid playing the file. The method that Adobe, Apple and microsoft andn others have designed to overcome this is to use javascript
Here's the apple example http://developer.apple.com/internet/ieembedprep.html - the others are similiar and you can google for those.

The downside of this is that someone with javascript disabled will not hear your content. But let's face it most people with javascript disabled probably aren't interested in your content anyway.

The last resort is to make it a downloadable link. Personally I don't think that's very inviting, and many people aren't going to go to the trouble to download and open the file in a player which may or may not present it the way you want. Again this crowd probably isn't too interested in your content.

So determine your audience, the experience you want to give them and proceed with one of the three directions.



Linda
Thanks for your response. I'm afraid I need some baby steps help, though. Can you point me to a reference for the obj and embed tag insertion? I'm not at all sure what I'm doing here. I have worked in FP and now am using Expression Web. Thanks. Linda
jimlongo
Linda,
you can download this application: Pageot which will automate the process of embedding QuickTime. If your files aren't QuickTime files you might need to change some of the resulting tags (the classid part for instance), but at least this will give you the basic tag.
See if that works, if not post a URL.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.