|
-
Designer, Programmer, Musician
[RESOLVED] Start sound on movieclip press/drag and on mouse move
Hello guys! ^_^
I keep working in this 100floors like game...phew! Is a lot of hard work! But i achieved everything until now.
Now i have this window, and i want sound when sliding/rolling it. I already have sound when you release or stop dragging the window.
Actionscript Code:
windows.onRelease=function(){ this.stopDrag(); windowStop.start(0,1); }
Now i want sound when dragging the window movieclip. I tried this:
Actionscript Code:
window.onPress=function(){ this.startDrag(false, limiter._width);
onMouseMove=function(){ windowSlide.start(0,1); }
}
It works 90%, the sound starts when you press or start dragging the movieclip and move the mouse, the problem is the sound keeps repeating endlessly over and over. Its weird, because i put (0, 1) where "1" is start the sound "1" time. 99 Would be 99 times (like a loop)...
I noticed that when I move the mouse 1 pixel, the sound is played as I want, but if I move the mouse few pixeles, the sound repeats every time the mouse is moved 1 pixel...what i want , is when you are dragging the movieclip, obviously moving the mouse, the sound starts and keep playing at the same time I move the mouse, and when I release the movieclip or stop drag, it stops.
Is like when you are rolling or sliding a sliding door, or a sliding window , the sound is continious like "woosshhhh" until you stop sliding/moving/dragging/rolling it.
Help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|