Mouse trap
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Mouse trap
Howdy .. can anyone confirm that mouseOver can't be used to play a sound (.aif) that has been imported to the stack?
MouseDown works a treat but I'm trying to create an environment where a user can mouse over buttons that are coded to play a sound without having to click. MouseOver is silent in this regard.
MouseDown works a treat but I'm trying to create an environment where a user can mouse over buttons that are coded to play a sound without having to click. MouseOver is silent in this regard.
If we're treading on thin ice, well you might as well dance.
Re: Mouse trap
Maybe you could try mouseWithin?
Re: Mouse trap
Thanks for that .. playWithin actually works but it sets up a repeat loop that triggers the sound in a very fast loop, too fast for a user to control if several sounds are to be played. However (my edit) mouseEnter works just like I want so many thanks for the tip!!
If we're treading on thin ice, well you might as well dance.
Re: Mouse trap
Set a flag variable so that it plays once, then ignores the ‘play’ message. Use the idle message or mouseMove message to refresh the flag so that when they go within later, they will get the sound played once more.
Was the mouseOver message coming from being over a button or a graphic? What object was the ‘over’ referring to?
Glad mouseEnter works for what you need. That’s cleaner than the flag variable.
Was the mouseOver message coming from being over a button or a graphic? What object was the ‘over’ referring to?
Glad mouseEnter works for what you need. That’s cleaner than the flag variable.
Re: Mouse trap
Coming from a button. Great advice, I'll try tonight.
If we're treading on thin ice, well you might as well dance.
Re: Mouse trap
There is no "mouseover" message in LC!
-
- VIP Livecode Opensource Backer
- Posts: 9665
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Mouse trap
I didn't even have to look up "mouseOver". No such animal.
How about "mouseEnter"? One time use per, er, entry. Not sure how wildly the user will move the cursor around the screen, though.
Craig
How about "mouseEnter"? One time use per, er, entry. Not sure how wildly the user will move the cursor around the screen, though.
Craig
Re: Mouse trap
It was late at night is my only defense!
He got the idea anyway.
He got the idea anyway.