Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 10th, 2004, 11:56 PM
Authorized User
 
Join Date: Jul 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default How to had sound to a page?

Not background sound.. causal sound like some mp3 or wav playing only while you are over a certain div, or when you click a button.. something like that..

do you know?

Thx

 
Old February 11th, 2004, 01:06 AM
Authorized User
 
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you are using Dreamweaver; you can use the behaviors tab to add or embed a sound on a mouse over/out. Remember that mp3 take up a lot of bandwidth so.... either use midi or mp2 as your sound file. Keep them in a folder on the server that can be called at will.
Hope this is of some help

Larson

I think.....therefore..I code
 
Old February 11th, 2004, 12:00 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Why not directly code it?

IE has the bgsound tag:

<bgsound src="" id=sound>

and otherwise use embed:

<embed src="" id=sound style="display:none;">

And for your div (or whatever else you prefer):

<div onmouseover="document.getElementById('sound').src= 'sounds/yourfile.wav';" onmouseout="document.getElementById('sound').src=' ';">
:)
HTH,

----------
---Snib---
----------
 
Old February 20th, 2004, 10:44 AM
Authorized User
 
Join Date: Jul 2003
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to stalker Send a message via MSN to stalker
Default

Hi,

Thanks, That't the solution I use to use. But don't yu think HTML could be a little bit more developed.. I mean.. HTML is a standard for layout, and we use it to code interfaces.. The rest of the coding (engines, etc..) is scripted..

So I think HTML should be more developed in order to process sound in interfaces.. It's almost only a visual application standard..

I'll keep using it then.

Thanks.






Similar Threads
Thread Thread Starter Forum Replies Last Post
sound mohand Visual Basic 2005 Basics 1 November 27th, 2007 05:03 PM
sound goldenpiranha Pro VB.NET 2002/2003 1 December 7th, 2005 04:54 PM
Background sound surendran Flash (all versions) 1 August 3rd, 2004 07:39 PM
recording sound kale_tushar Visual C++ 1 September 18th, 2003 05:09 AM
Sound on/off Adam H-W Flash (all versions) 1 June 27th, 2003 03:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.