Hey all,
I'm doing a web banner, and I need a sound to play when the cursor is activly moving over the banner. And when the cursor stops moving, I want the sound to stop playing, untill the cursor moves again.
A real life example would be scraping fingers down a blackboard. Makes a sound when moving, doesn't when still.
Also I'd like the audio track to continuously loop if the cursor continually moves.
Any ideas, snippets of code that might help would be great. I'm close, but no cigar just yet.
Thanks
porgeet
Play sound on mouse move Play part of an audio track while the cursor moves, stop when still
Array#2
Posted 01 March 2009 - 11:56 AM
Bump!
Don't want to be an ass guys, sorry. I could REALLY do with some help on this one
Thanks
Don't want to be an ass guys, sorry. I could REALLY do with some help on this one
Thanks
#3
Posted 02 March 2009 - 04:23 AM
if your using as3 add a listener to the stage mouse move event
im not seeing whats so difficult, another thing to bear in mind is if this banner is going on any "commercial" site or whatever then sound will have to be turned of by default and have a toggle button.
stage.addEventListener(MouseEvent.MOUSE_MOVE,playAudio); function playAudio( e:MouseEvent ):void { // tell your net stream to continue playing, google for playing audio in flash and seeking }
im not seeing whats so difficult, another thing to bear in mind is if this banner is going on any "commercial" site or whatever then sound will have to be turned of by default and have a toggle button.