PDA

View Full Version : onmouseover tick sound


igor
08-29-2006, 06:05 AM
Hi all,

I would like to play a tick sound for onmouseover event.

I've tried to load it:

<view id="sound_tick" play="false" oninit="this.setSource('sound/tick.swf');"/>

It plays upon initialization and this doesn't work within the onmouseover event handler:

sound_tick.play(0);

Any suggestions?

Thanks

swffoo
08-29-2006, 07:03 AM
have you tried onmouseover="this.setSource('sound/tick.swf');" ? Not that this is correct, but it may work.

igor
08-29-2006, 08:30 AM
Unfortunately it doesn't work reliably.

Originally posted by swffoo
have you tried onmouseover="this.setSource('sound/tick.swf');" ? Not that this is correct, but it may work.

swffoo
08-29-2006, 09:57 AM
I don't have any sound files on hand to test this right now, but how about sound_tick.play(1) or sound_tick.setPlay(true)? Frames may not start at zero although that is normally the case with programming.

igor
08-29-2006, 10:03 AM
I've already tried play(1) and setPlay(true) functions. they dont play the sound

swffoo
08-31-2006, 02:28 PM
How about this?

<canvas height="150">
<audio src="resources/poof.mp3" name="poof"/>
<button text="Poof" onclick="LzAudio.playSound('poof');"/>
</canvas>

illogic_code
09-01-2006, 07:52 PM
poof !!!

hahaha

dude, nice name!

4nk1t
09-03-2006, 03:59 AM
ya, this thing works like a charm. Its in one of the exapmles that come with the laszlo installation.

Also, just a bit of info, might not be a news to many...
for sound effects, try http://www.flashkit.com Nice collection!!!

igor
09-03-2006, 06:57 AM
Yes, its working, thanx.

Thank you for the link.