Reply
Old 11-28-2005, 06:30 PM Adding sound to CSS?
Brow's Avatar
Average Talker

Posts: 22
Location: Indiana
Trades: 0
I've recently set up a "style switcher" on my site and would love to insert a sound into it. ( http://www.webturd.com - find "BF2 NightVision" with the smilies )

The reason for this is that the other style to switch to is supposed to represent night vision...and I wanted to have a sound come on like when night vision goggles are turned on. I also want the sound only come on when the night vision style is activated.

Is this possible to do? If not, is there an alternative?
Brow is offline
Reply With Quote
View Public Profile Visit Brow's homepage!
 
 
When You Register, These Ads Go Away!
Old 11-29-2005, 01:54 PM
Harvey's Avatar
Super Spam Talker

Posts: 901
Name: Harvey C
Location: Brighton, UK
Trades: 0
Javascript! I have no idea how, but I'm sure a sound-play and then a CSS-change could be achieved using JS. Try reposting in the JavaScript forum and somebody might be able to help.

Good luck
__________________
Buy wii fit|Gift ideas
Harvey is offline
Reply With Quote
View Public Profile
 
Old 11-29-2005, 02:29 PM
spiralfive's Avatar
Skilled Talker

Posts: 63
Trades: 0
I don't know how to do it, but I agree with Harvey. When the user clicks the button, JS calls the audio file and the new CSS at the same time. You could inlude a <noscript> tag for browsers/users non-compatible with Javascript, and use the reqular button without sound.
__________________
Webmaster Noobs
spiralfive is offline
Reply With Quote
View Public Profile
 
Old 11-29-2005, 04:49 PM
funkdaddu's Avatar
Web Design Snob

Posts: 636
Trades: 0
Not in CSS, but possible via JS:

http://www.phon.ucl.ac.uk/home/mark/audio/play.htm

http://www.google.com/search?rls=en&...UTF-8&oe=UTF-8
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Old 11-29-2005, 06:32 PM
madkad's Avatar
Ultra Talker

Posts: 310
Location: UK
Trades: 0
I am sure you can do this in CSS i have seen how to do it some were

This is my thought on sounds on websites i really wouldnt recomend it as it can make your website slow and may be distracting to your users

but that may be just my thought
__________________
Earn $25 A Referral | Mad Kad Computers | Webmaster Forum | Graphics Forums

SEO Forum | Internet Marketing Get found within the search engines and earn money
madkad is offline
Reply With Quote
View Public Profile Visit madkad's homepage!
 
Old 11-29-2005, 09:36 PM
funkdaddu's Avatar
Web Design Snob

Posts: 636
Trades: 0
You can change how some accessibility speech programs read the text on the page:
http://www.w3.org/TR/REC-CSS2/aural.html

In CSS3 they are planning audio capabilities, but none have been defined yet.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to Adding sound to CSS?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.09964 seconds with 13 queries