Help - Search - Members - Calendar
Full Version: Mouse Click Function
HTMLHelp Forums > Web Authoring > Graphics, Flash and Multimedia
grindle
Hi,

I am relatively new to html, so please go easy.

I know what I want to do, but am a bit unsure how to tackle it

basically I want to show a graphic on a page

when the graphic is clicked, i want it to change

then play 1 of 4 sounds randomly from a library (url)

then when the sound is finished revert back to the first graphic

Its basically a head, click on the head, mouth opens, plays a random sound (1 of 4) then when the sound has finished the mouth closes.

Is this possible, i would be so grateful for any help.

I have looked at the mouse click function as a starting point

Thanks
pandy
Well, this can't be done in HTML. Possibly with JavaScript, but I'm not sure about the bit you want to happen when the music stops. Maybe Flash would be the best option.

To be honest, JavaScript and sound has been pretty confusing to me the few times I've tried and I don't do Flash, so I can't offer more than in push in a better direction than HTML.
grindle
QUOTE(pandy @ Sep 19 2012, 11:23 AM) *

Well, this can't be done in HTML. Possibly with JavaScript, but I'm not sure about the bit you want to happen when the music stops. Maybe Flash would be the best option.

To be honest, JavaScript and sound has been pretty confusing to me the few times I've tried and I don't do Flash, so I can't offer more than in push in a better direction than HTML.


Well that's a start, I suspected it the solution wouldn't be HTML, I'll look into Java script

Thanks
pandy
If you want I can move this thread to the JavaScript forum. Maybe Christian or someone else know how this works better than I do.
Christian J
I don't know much about JS sounds, except that I recall it's good to preload the audio files (as new Objects?) . I don't think it's possible to detect when a sound has stopped playing, maybe you can add a timer in the script and hope that the delay matches.
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-2018 Invision Power Services, Inc.