ActionScript 3.0 :: Get Bytes For Microphone Sound?
May 20, 2008I was wondering if there is any way to get the sound bytes froma microphone and apply it to lee brimelow's tutorial on sond spectrum?[url]...
View 4 RepliesI was wondering if there is any way to get the sound bytes froma microphone and apply it to lee brimelow's tutorial on sond spectrum?[url]...
View 4 Repliescan i mute MICROPHONE sound using AS3?
View 1 RepliesWe 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.
View 2 Repliesi dont know that how mix a mp3 files with microphone in as3 and where should I start.
View 1 RepliesI am currently having a problem with Flash CS5. I am trying to link a sound file to my Flash game without having to put it on the stage. It would play when my character got hit by an enemy. The problem is is that when I go to edit the properties, all of the options except to play the sample are all blanked out. This is currently driving me insane as I have done everything I could think of to get around this.
View 1 RepliesThis 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?
[Code]....
if there is a way I can change the imput sound from a MP3 to use the microphone instead?I have so far done this in the code but still with no luck.
//var s:Sound = new Sound(new URLRequest("music.mp3"));
//s.play(0, 1000);
var myMic:Microphone = Microphone.getMicrophone();
[code]....
I have a legacy file format that contains sounds embedded in it (in various encodings). I would like to be able to play these sounds in Flash (Air?) by reading the sound bytes out of the file and instantiating a Sound object with them.
If the sound is unencoded (e.g., raw pcm), I've found that I can use the new flex 4 SampleDataEvent.SAMPLE_DATA event to play the sound.
However, if the sound is encoded (e.g., mp3), then I'm at a loss. The sound expected by SampleDataEvent.SAMPLE_DATA has to be raw pcm. From what I've seen, encoded Sounds can only be instantiated by [Embed]ing them, or by using a URLRequest with Sound.load().
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?
View 2 RepliesI'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.
View 13 RepliesI 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 ?
View 0 RepliesI 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.
View 1 Repliesway 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.
i have the actionscript to allow an object to be manipulated by the sound received in the microphone:
m = Microphone.get();
attachAudio(m);
m.setUseEchoSuppression(false);
onEnterFrame = function () {
circle._xscale = circle._yscale = m.activityLevel+50;
};
but i need the script to allow the function that when sound is made it triggers a jump to a different frame.
how can I get the bytes loaded and bytes total, from a JPG i'm loading using loadMovie? the point it's making a loadbar
Code:
image.loadMovie("pic.jpg");
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
here's my code:
import flash.media.Microphone;
import flash.events.ActivityEvent;
masker.height = 0;
[Code]....
Is it possible for me to record sound from a microphone using a lower version of flash player, say Flash Player 9?
View 2 RepliesWhile recording the flv is saved inside applications/stream/samples/audio.flv. But it is not working properly.[code]
View 1 RepliesI'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:
package
{
import fl.controls.Button;
import fl.controls.TextInput;[code].....
What I'm trying to do is get the total bytes of all the files I want to load and display the percentage loaded of total bytes and bytes loaded of all the files. Its a slideshow so i want all the files loaded and then it will play. I've looked at bulk-loader but it wasn't what I needed. The image are loaded from an xml file. I think I would need to create an Array and then find out the total bytes but I don't know how to reference the loader in the progress.
[Code]....
I am streaming flv file trough vlc media player running as http streaming server. So I am able to get the bytes but how to decode them?
Shoud I take float from the URLStream with readFloat() or plain bytes with readBytes()?
so i've tried a few different preloaders but it seems that the only one that works with what i'm doing is a preloader in a seperate scene.
my question: Is there a way to grab the bytes loaded and total from the main scene and show them in the preloader scene?
Is it possible in flash using as3 that we read first few bytes from a file and calculate MD5 of it ?
View 4 RepliesI have very large pngs (20000x20000) that have sprites of an animation.
I cant load the whole file as a bitmap because it exceeds the maximum image size that flash allows.
Is there a way to load the file as bytes, and then parse it into several small bitmapdatas that each contain one sprite of the animation?
I need to get the density and units from loaded images, both jpg and png. I am able to get the data, but the bytes do not seem to be where they should, according to [URL]..rchange_Format units, xDensity and yDensity should be proceed one another, but I get an unknown value between units and xDensity. Am I reading the JFIF specs wrong or am I doing somthing wrong with the byteArray? Same with pHYs data in pngs, I can get the data but it's not where I expect it according to
[Code]...
Edit: Forgot to add, I am reading the first 100 bytes of the loaderInfo, picked this number arbitrarily. Any suggestions on a safe length, long enough to ensure I can retrieve the metadata but short enough to keep it quick.
My script does not show total bytes, I do not know where did i mistake[code]...
View 1 RepliesI have a utility function that will display a filesize in an appropriate form like Windows Explorer does, i.e; convert it to nearest KB, MB, GB etc. I wanted to know if the code that i wrote is correct, and if it can be made simpler.The function that i wrote is as follows :
public static function formatFileSize(bytes:int):String
{
if(bytes < 1024)
[code].....
I want to send data of bytes from .net server to flash client. i have created a simple .net tcp server but what code would i need to create the flash tcp client in order to receive bytes NOT string or xml, just bytes?
View 1 RepliesHow can I get the size of a ByteArray in bytes? I want to know, to see the difference in data transferred before and after the compression of a string (via ByteArray).
View 1 RepliesI want to count how many bytes the text in a textfield are. Similar to the lenB in asp.net. I'm trying:
userText.text.ByteArray.length
It isn't working, perhaps I using it wrong. The reason I want it is so that multi byte characters will return as 3 bytes but spaces and numbers will still be 1 byte.
I get: 1119: Access of possibly undefined property ByteArray through a reference with static type flash.text:TextField.
I have: import flash.utils.ByteArray;