i know this is a problem allread often talked about, but i cant solve it.i want to start and stop a sound with a mouseclick event.the problem seems to be that the click event is never triggered. can anyone see why?
1) I have a button and when I put cursor over it, it must start looping a sound. When I drag away, the sound must stop. I would be even cooler if it was possible to make the sound fade away when the mouse is rolled away. I have no problem creating another sound file that fades my current sound away.
2) I have a button which represents a knife, that should stab something (a panel) once pressed. So fist the knife must be clean. but after one or more presses, the blood should remain as a movie clip (as I want to animate the dripping blood)
3) once rolled over a button, the sound must start looping (as I wrote in 1.) AND the knife should slowly go backwards (MC). BUT when I roll mouse away, the sound fades away (as in 1. again) PLUS the knife should slowly move back to its place in stead of just jump from one place to another.
I just started playing around with as3 and I have a function for mouse clicks that draws a shape on each click. However the mouse click event does not appear to work unless I click a movieClip object I placed in the middle of the screen. Is there a way to make the mouse click event recognize when I click anywhere on the screen?
I have been trying to code this so that when my mouse rolls over the invisible button, an external mp3 file ("roundandround.mp3") will play.....and once the mouse goes out of the invisible button hit area, the song will stop playing. I have the below so far, but it isn't working---nothing plays when I roll over the button. I understand you can just drag and drop the sound file into the "over" frame of the button, but if you do that, how do you stop the song from playing when your mouse goes outside of the button?
var mySoundReq: URLRequest = new URLRequest("tv-static-04.mp3"); var mySound:Sound = new Sound(); var mySoundChannel:SoundChannel=new SoundChannel();
I changed the mouse cursor using a tutoral from this forum, but when I press the right mouse button,the standard mouse cursor reapears.How to prevent that?
I am trying to have two guestures on a SpriteVisualElement which I thought should be pretty simple implemented: Mouse_Move for sweep Gestures and mouse click to enable.. So I have 2 Eventlisteners on my stage:
[Code]...
The main problem is that every type of sweeping on the screen also fires the taphandler().. how to identify the correct event? I tried to to my taphandler only if(!event.buttondown) but no success.
I am looking for a way to simulate a mouse hover/mouse click. What's happening is a bar is autoscrolling and checking to see if there is an active button 'below' it. Sort of like a bar rolling along a music staff and checking for notes.
How can I edit sound from a timeline if I don't have the original sound file? When I right-click my sound in the library, I can't open it in any sound editor program. What do I do?
I have some code on my button that should play my sound file, but when I run my FLA, it shows an error. The error says, "Scene 1, Layer 'Layer 1', Frame 1, Line 1 1046: Type was not found or was not a compile-time constant: button1" Does anyone know how to fix this? I have exported the sound in actionscript but nothing?
I'm currently recording sound and storing the byte array for playback and subsequent encoding to mp3.
Unfortunately though I am getting a click sound at the very beginning of the recording.
I have attempted a couple of methods to try to eliminate this such as:
recording the first .3 seconds with mic.gain = 0; then setting mic.gain = 50; clearing the byteArray after the first .3 seconds then continuing to write the bytearray (in effect deleting the first .3 seconds of the recording.)
Neither of those methods has stopped the click being added.
how I can prevent the click from being added?
Here is my recording/storing code:
public var mic:Microphone = Microphone.getMicrophone(); public var micSilence:uint; private var soundBytes:ByteArray = new ByteArray(); private var soundBA:ByteArray = new ByteArray();
If I "Right Mouse Click" on a Flash SWF file embedded in a page and click "Print" it prints just the flash, in perfect colour etc etc..How can I achieve this exact operation, but as a button in Flash? So it prints just as if I did the above operation.
As an extra, if you know how - Is there any way I can default the page to print out "Landscape" too ?
A graphic of a piano keyboard with hot spots on each key when the user clicks two things happen.The note plays from a sound file a small graphic of the note displays where the note is on the staff and give the user the name. It stays until they move the mouse but the not only sounds once per click.
The sound only plays when I hold the mouse button down. I need it to play when I click it. But it has to stop the sound from playing twice import flash.media.SoundMixer; this.addEventListener(MouseEvent.MOUSE_UP,f); function f(e:Event):void{ SoundMixer.stopAll(); } here is a link to my swf file [URL]
I want a link to trigger a sound click in flash AS3. I've taken the .play() outside of the function to confirm that it works by itself. What am I missing that will let me call an AS3 function from javascript?
Here is my html <object width="5px" height="5px"> <param name="movie" value="play_coin_sound/playCoin.swf?v=5"> <param name="wmode" value="transparent"> <embed src="play_coin_sound/playCoin.swf?v=5" width="5px" height="5px"> [Code] .....
I have a movie clip with a sound at the beginning of my project, and when I click a button in another scene it starts playing the voiceover from that clip. I don't have the button linked to that clip.
I am making a gun game, and I want to make so that it plays a sound when you click the mouse.I have the sound already imported, and i am using it in an external (.as) file for a pistol. I've spent hours incorporating it into a movie clip, but it either plays over repeatedly or just doesn't even go.Is there any way to do this? Ive tried lots of tutorials before I came here but nothing seemed to work
I got it working fine, but was wondering how to program a function for another button to stop stop playing that sound?I tried a function with snd.stop(); but that seems to be incorrect.
I have a flash animation with three different icons which play individual audios.
In one of the movies called 'bird' that I want to stop, I have in the first frame following code.
Code: x = new Sound(); x.loadSound("mp3/cocky.mp3", true); which works fine.
This movie 'bird' is then inside another movie called 'container' , any everything then sits in one scene.
In the movie 'container' I have three buttons which play individual sounds using same 'x.loadSound("...' method.
You first see and hear the animation of the 'bird' and it's sound playing straight away. After a 30 sec sound and the animation stops.
All working so far fine up to this point... But What I need is , when the user clicks on one of the other buttons to play the sound WHILE the 'bird' is still playing, I want to stop the 'bird ' animation.
At the moment it stops the sound of the 'bird' but NOT the 'bird' animation. Naturally If I wait 30 sec 'bird' animation stops and no problems there after. Only if and when user clicks before the 'bird ' animation is the problem.
I have a question. In my banner i have a external FLV video that i want to play without sound when it loops.. But on mouseOver on the video i want the sound to start, and on mouse out, i want the sound to stops. My code looks like this: