XWidgetSoft Forum https://www.bbs.xwidget.com/ |
|
Sound day/night script https://www.bbs.xwidget.com/viewtopic.php?f=8&t=5309 |
Page 1 of 1 |
Author: | Jimking [ November 29th, 2014, 7:27 pm ] |
Post subject: | Sound day/night script |
I have a .wav file that on mouse enter on an image the sound plays. But I need this sound play only on day.. I use this tag for appear/disappear the png "bg_${dayOrNight}.png" between day and night, but the mouse enter still working and the sound plays even with the png hidden.. Any help guys? |
Author: | Tony [ November 30th, 2014, 5:35 am ] |
Post subject: | Re: Sound day/night script |
Hi Jimking, The "bg_${dayOrNight}.png" tag just load diffent png to the same image control, so the sound plays. you can write script code in image mouseEnter event: Code: if (image1.src.indexOf("_d.png")>=0)
playSound("a.wav"); |
Author: | Jimking [ November 30th, 2014, 7:16 am ] |
Post subject: | Re: Sound day/night script |
Thanks Tony. Works great! ![]() |
Page 1 of 1 | All times are UTC - 8 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |