click on a photo and get a sound

  mco 22:51 01 Mar 2006
Locked

How do I do this? Or is it too hard for me? Say I have a photo and if you click on a certain area -the 'correct' one- you get a sound like clapping -or if you click on another area -the 'wrong' one - you get booing? Highlighting the area or uploading the file is not the problem;it's how to link it to the photo such that the sound comes on automatically rather than opening window in windows media player or whatever. And works across all browsers, as I've seen an example that worked in IE but in Opera and Firefox asked you to download the audio file - kind of spoils the suprise of getting a clap or boo. I heard mention of javascript but what and how?

  ade.h 23:40 01 Mar 2006

Hi mco.

I would draw a hotspot on it and link the hotspot to the sound file.

Should do the trick, I think.

  ade.h 23:41 01 Mar 2006

How you handle the sound would be up to you; probably some kind of stream I guess.

  mco 00:05 02 Mar 2006

(too late to try out tonight) I fear merely doing that would result in the file coming up in a real or media player box and starting to play, separate from the picture; which would be no good. And as I've said, I've seen one that works in IE but the effect is spoilt in opera and firefox by you being invited to download the audio file. I want the sound to come on immediately whether you invite it or not!

  ade.h 12:48 02 Mar 2006

Opera and F'fox handle media slightly differently, it's not impossible to get around. I believe that there is a script method of playing an embedded sound without a plugin. The WMP plugin would do precisely what you want to avoid.

  mco 13:02 02 Mar 2006

I'll forget it and instead just make a pop-up window if they click on the 'correct' area...sure that must be manageable in NOF?

  ade.h 13:12 02 Mar 2006

Yeah, that's easy to do, again by applying a hotspot and choosing a pop-up window from the link box, then customising the size of it.

Don't give up though, because I know that this is doable; I have seen websites that play a sound on a particular action and they work in Firefox.

Speaking of actions, that has jogged my memory; have you thought about the actions tab in the properties pallette? This allows you to assign scripted behaviours to specific mouse-hovers, clicks and so on. Might well be the answer!

  mco 16:32 02 Mar 2006

but I intend to have a go tonight - the day job very irritatingly gets in the way of website experiments!

  mco 01:08 04 Mar 2006

I'm ticking this one because I've started another one progressing from here.I've given up on the sound. The furthest I got was to get it to play automatically when the page loaded -but that was no good because I needed it to play when you actually clicked on the chosen selected area. So I'm working on popup messages now - see other post.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5 review

See the work of famous artists playing with toys

iPad Pro 10.5in (2017) review

Comment faire une capture d’écran sur un Mac ?