ActionScript 3.0 :: Animate A Mask Over A Sound Meter According To The ActivityLevel Of The Microphone?
Nov 15, 2009
I am trying to animate a mask over a sound meter according to the activityLevel of the microphone. If I understood what's in the livedocs, the activity level is the amount of sound captured by the microphone, right? well, I'm trying to use it in order to do the animation but I have two problems:
1. there's a very annoying sound coming out of my speakers
2. nothing happens when I talk through the microphone
I am trying to saturate a flash animation from left to right with a blurred wipe. I am attempting to do this by creating duplicate movie clips, with one of the movie clips having a filter to completely desaturate the color. I am hiding the saturated movie clip with a mask (basic rectangle) that I am animating to move out of the way revealing the "color". I would like my desired effect to "fade" in by adding a horizontal "x" blur to the mask. I have been successful at wiping in the saturation, but Flash seems to be ignoring the blur on the mask I have created.
Code: var _mask = new Sprite(); _mask.graphics.beginFill(0x000000); _mask.graphics.drawRect(0,0,mc.width,mc.height); _mask.graphics.endFill(); mc.mask = _mask; var timer:Timer = new Timer(100); var foo:Function = function (e:TimerEvent) { _mask.x += 1; if (_mask.x > mc.width) timer.stop(); } timer.addEventListener(TimerEvent.TIMER, foo); timer.start();
Nothing happens... FYI I tried with Tween too but the same result. I know that mask only works when the associated displayobject is on the display list. Can it be something with that? If I set the x of _mask staticly (no animation) it works.
First let me say that I am just starting out in AS3 so this may be a simple problem that I am having due to my lack of experience. Goal: I have a mask over a mc that holds video being streamed in. This mask is set to show only a portion of the video and when the user mouses over the mask I want it to expand to show the whole movie. When the user mouses off the mask I want it to re-size back to its original size.Problem: The second time the mouse is over the mask, it does get tweened to the larger size, but you do NOT see the animation occur. It just blinks in.Code:I have included everything but my video class and grid class.For this I have turned off my grid. BTW this my FLA file includes this class. I have this feeding from an xml file, i removed that code. I also have 2 other movies that will function the same as movie1 but I have removed that code. Once I get movie1 working it should be fine for movies 2 and 3.
We are working on a project to record a sound a we need to play back in flash 8 (as 2.0). we have 3 buttons like play /pause, record, stop, When we clik on record button we can record the sound through microphone and when we clik on paly /pause button the recorded sound should be played. so can we record and can we play back in flash 8.
This captures microphone sound and changes the alpha of 'foo' according to the sound level. However, I hear the microphones input. I want the visuals to work without hearing any sound. How would I do that?
What I want to know is if it is possible to record a sound clip using a microphone and then upload it to the server using a swf applet in a webpage. Im an experienced java/javascript programmer but just starting out with flash/action script. What technologies will I need to do this? Can I do this simply using simply an swf file and an apache/php or jsp page?
I'm working on a project for my Flash class that seems to be above everyone's heads. What I'm trying to do is figure out how to take sound from a microphone, register the level/volume of that sound in flash. So if the level is 25 then a movieclip and a different sound is played back. Problem is I don't know what coding I can use to register a microphone and take whatever sound is put into the microphone and display a movieclip.
I am developing an application in flash(AS2) with FMS/RED5. where i want to record sound through microphone with background music(Flash is playing mp3). is that possible in as2 ?
I am currently an English teacher and I am familiar with programming in DOT.Net platform. I am completely new to Flash. I turned to this platform because I thought that would be the best way to prepare interactive computer based exams in English. My real problem is, I don't have the slightest idea as to how I can create a Flash application which records the sound through the microphone and saves it on the local disk.
way to get access to sound samples coming from a microphone ?
So far I have not found such a function. In the meantime I am trying to overload alsa functions e.g: snd_pcm_readi to see if I can get the samples before flash treats them, but no success so far.
As a matter of fact, since I have no idea how both sound and microphone class work internally, I don't know exactly which alsa functions they call.
Can any one indicata me a small piece of code for making this progress bar move on mic activitylevel. When spoken on the microphone the progressbar should indicate it.Also which works on internet explorer
I'm setting up an application where I need to record users' voice every so often during the course of the users' interaction with the application. Recording is fine, and the quality is fine, but now my issue is understandng how Flash handles the microphone when it gets attached to a stream for publishing.Basically, the problem is that when I "publish" my stream, the voice gets cut off (clipped) at the beginning. So, I initially thought this may have to do with buffer settings on the FMS server side, but it wasn't. Then I investigated client side stuff. For some reason, my internal mic .activityLevel property is -1 even though I have called Microphone.getMicrophone(). According to Flash's documentation, this shouldn't be the case:
activityLevel propertyactivityLevel:Number [read-only]Language Version : ActionScript 3.0Player Version : Flash Player 9The amount of sound the microphone is detecting. Values range from 0 (no sound is detected) to 100 (very loud sound is detected). The value of this property can help you determine a good value to pass to the Microphone.setSilenceLevel() method.If the microphone is available but is not yet being used because Microphone.getMicrophone() has not been called, this property is set to -1.I am using a timer to investigate the microphone .activityLevel property every 50 milliseconds:
I have tried this about 24 different ways now.Within main movie there lies a movie clip called soundcontrols_mc. Within this i am creating a emptyMovieClip via actionscript seen below:[code]Now all this code lies within soundcontrols_mc and I have tried rewritting it many ways for navigational control and also placing it within the pt_mc but when I do that all songs restart everytime animation happens.Things I have tried (just started learning action script from AS, The definitive Guide).So I have altered _parent, _root swapping all types and degrees of them and cant get a response from my handlers.
I need a meter that shows the current bandwidth rate as a percentage. For example: The maximum bandwidth rate is 4mbps, the current bandwidth is 3mbps, so the bar would be 75% full. This bar would change dynamically as the bandwidth rate changes.
Is there anything out there that already exists like this?
i wanted to make a flash document , that when i try to click my mouse 1 as fast as i can on a button, it will measure how many mouse1 cliks per second,and display the mouseclicks/second in the corner , i was wondering how to do this , i am the noobiest noob at flash programming ever.
I'm trying to figure out how to bring in a number from xml into this analog meter so that it will display the number in the meter. I believe I'm supposed to use LoadVars object but not sure where to implement it.
i got a problem with my rotating meter. it works with key press.
Z= 1/4 X = 1/2 C = 3/4 V = 4/4
R = reset the meter to zero. the problem it tat the meter just go haywire when it goes more than 180 degrees rotation. so i cant get it go to 3/4 and beyond. i dunno where i go wrong.
AS3 or Flex : How to create a voice pitch meter/analyzer? Is it possible? How to create voice pitch analyzer on flex or AS3? do you have any idea? or is there any software like this that can be used on a web site?
I have a startDrag function set up on a loader and mask that when the mouse is down on the loader it drags, when not it doesn't. There is also 2 buttons that control whether mask1 or mask2 is used. What i would like however is when the mouse is down - the area of the loader outside of the mask is visible but only by about 10/20% alpha, that way the user can see where all the image is while dragging. Is this possible? Full code can be seen below and i have attached the zip with the .fla file:
what i am doing is to make something along the lines of the "scriptable mask" tutorial Inigo was kind enough to put up.My idea is to have a large mask behind the whole of my flash site, this masks a colour image with a black & white one (nothing tricky). The image I am using is actually 5 separate images combined, and each is a pic of certain parts of the site.I also have a very basic set of buttons along the bottom... each corresponding to each section.
All I want is to set it up so that when I mouse over the buttons, the _x of the mask moves to correspond with the correct image... really very basic... or so I thought .If anything it should be easier to do than what is in Inigo's tut (where he uses the _x of the mouse to move the mask)... i just cant seem to get it to work with a nice easing effect (its easy to get the mask to simply snap to each coordinate, but I need it to smoothly move).