Mouse Click Function |
Mouse Click Function |
grindle |
Sep 19 2012, 04:53 AM
Post
#1
|
Group: Members Posts: 2 Joined: 19-September 12 Member No.: 17,806 |
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 |
Sep 19 2012, 11:23 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
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 |
Sep 20 2012, 06:18 AM
Post
#3
|
Group: Members Posts: 2 Joined: 19-September 12 Member No.: 17,806 |
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 |
Sep 20 2012, 09:10 AM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,731 Joined: 9-August 06 Member No.: 6 |
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 |
Sep 20 2012, 12:53 PM
Post
#5
|
. Group: WDG Moderators Posts: 9,658 Joined: 10-August 06 Member No.: 7 |
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.
|
Lo-Fi Version | Time is now: 26th April 2024 - 02:31 PM |