Actionscript 3 :: Generate An X Second Silence Audio File With ByteArray And Adobe Air

Dec 15, 2011

I would like to generate a sound in Adobe Air using ByteArray. The sound should be a silence of x seconds. I found this code that I am using to generate the bytes:

private function encode(data : ByteArray) : ByteArray
{
var channels : uint = 2;
var bits : uint = 16;

[Code].....

But when I save the file using Filereference and import it into a flash file I get an error message saying that there were problem reading the file.

View 1 Replies


Similar Posts:


ActionScript 3 :: Generate Silence Audio Files With Adobe Air

Dec 13, 2011

I want to build an air app that takes input (for example a list of filenames to be generated) from the user and generates sound files with desired naming. The sound files should be an "empty/silence" sound (wav, aif or mp3). Is it possible the generate such a file? If not, can I use an existing sound and embed it into the app and have that as a source when generating the files? The purpose of this is to get a structure of files ready in the project that will be replaced by our Sound Director. This way, we can trigger all sounds before they are created.

View 1 Replies

Flash :: Get A Bytearray From File Stream In Adobe AIR?

May 27, 2010

I read limited (small - 15 - 500 mb files). I need to be able to put all file bytes into one single bytearray. So I have a function:

[Bindable]
public var ba:ByteArray = new ByteArray;
//.... code ....//

[Code]....

But it does not work=( - gives me Error: Error #2030: End of file was encountered.

How to get a full bytearray from stream to use it as normal bytearray?

View 1 Replies

Actionscript 3 :: Generate A Shortcut File With Adobe Air?

Dec 1, 2011

I would like create a application that can can create folders and short cuts to folders in the file system. The user will click a button and it will put a folder on there desktop that has short cuts to files like //server/folder1/folder2 Can you create a desktop shortcut with code in adobe air? How would you do that? How do you create a folder? I keep thinking this should be easy but i keep missing it.

View 2 Replies

Xml :: Flash - Adobe Flex - Generate File?

Mar 16, 2012

I am trying to generate XML file in Adobe Flex 4.6. This is my code.

public var prefsFile:File;
[Bindable] public var prefsXML:XML;
public var stream:FileStream;

[code].....

View 2 Replies

Actionscript 3 :: Adobe Flash : Playing Speex Audio From A File

Aug 5, 2010

I have tried really hard to find an example showing how to play speex encoded audio in flash. I tried the following code -

var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);

[Code]....

I tested the above code with .flv videos and AAC encoded audio files and it works just fine. But when I try stream_ns.play("sample.spx") I get a stream not found exception.

Am I using the wrong container (.spx) for speex audio. Is playing speex audio from a file supported?

View 4 Replies

Actionscript 3 :: Adobe Flash : Playing Speex Audio From A File?

Apr 8, 2005

I have tried really hard to find an example showing how to play speex encoded audio in flash. I tried the following code -

var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);

[code].....

View 1 Replies

ActionScript 3.0 :: Encode Audio ByteArray As Mp3?

Dec 1, 2011

I'm recording audio in a Flash app and need to encode the bytearray being sent to the server. I haven't found a good encoder (client-side) to compress the bytearray before sending.

View 5 Replies

ActionScript 2.0 :: Generate Audio Using Only?

Jan 17, 2006

this question/challenge is inspired by the 25 lines actionscript contest. i was thinking it would be neat to do an audio entry. but i think there is no way to generate audio using only actionscript. am i wrong? can we fool the player into playing image data?

View 4 Replies

Actionscript 3 :: Store A ByteArray In Adobe AIR Local SQL?

Nov 12, 2010

I can read an image from hard drive and get a ByteArray from its source. Is there any way to store those bytes in local SQL database? What datatype for this field I need to choose?Or maybe there is a more clever way to save an Image file itself into AIR SQL?..

View 1 Replies

Flash :: Arrays - Passing Audio Data ByteArray To Javascript?

Sep 7, 2011

I'm able to record sound with a Flash application embedded in my website, this audio is saved to a ByteArray, which I need to pass to Javascript in order to post to my server along with other required data.

I know I can use AS3 ExternalInterface class to communicate with Flash from Javascript, but what would be the appropriate format or variable type in javascript to hold the ByteArray, and how can I ensure that I won't lose much audio data when doing so?

View 1 Replies

Actionscript :: Calculate The Average Frequency Of An Audio Recording Captured As A ByteArray In Flash?

Nov 30, 2011

Keeping it simple for now but assuming i have a ByteArray full of sample data is it possible to calculate the average frequency (thus a pitch) from the entire recording? Is this along the right lines? p = 69 + 12 x log2(f/440hz) ...

View 1 Replies

Flex :: Retrieve The ByteArray From A FileReference Class Using Adobe Flash Player 9?

Feb 5, 2010

I am trying to retrieve the ByteArray from a file selected using the FileReference class so that I can pass this to a Web Service call that I am making to Sharepoint.Is there any way I can do this using Flash Player 9 without having to upload to a remote server first and then downloading the file to extract the ByteArray?

This is assuming you can't use Adobe Flash Player 10 and the data property from the FileReference class.

View 1 Replies

Actionscript 3 :: Use The Method SetPixels(rectangle, ByteArray) Of BitmapData In Adobe Flex

Feb 3, 2011

Error #2030: End of file was encountered.

This method is not working

I am using it like this

var ba:ByteArray = new ByteArray();
ba = bmd.getPixels(bmd.rect);
bmd.setPixels(srcRect, ba);
bm.bitmapData = bmd;
img.source = bm;

View 1 Replies

Professional :: Adobe Flash CS5 Product Directly Generate Mp4 / other Formats In Addition To SWF?

Sep 8, 2010

Why not have the Adobe Flash CS5 product directly generate mp4 and other formats in addition to SWF?From my chair (as an Adobe Flash CS5 user) it 

-Going about using other additional software has direct effect on a software budget.
-Costs extra manhours to gather information of how it is done.
-Costs extra manhours/user time to process.
-Perhaps even increases the likelihood for errors and noise in re-processing already processed files (SWF->{F4V,MOV,MP4}) (F4V->{MP4,MOV},)relative to the original source FLA file?

View 3 Replies

Html :: Flash Audio Player For M4a (AAC) Audio File Embedded?

May 15, 2007

I'm looking for a (free) flash player that I can embed in my site and use to play a .m4a (.mp4 with AAC audio) file that will be obtained using a URL (i.e. it's not local to the server hosting the web page).I've tried searching on google for one, but either I'm searching wrong or no one has made such a thing. Ideally this would be very simple (small user interface with play button and maybe a progress bar) and it would be easy to have multiple instances of on an html page (can create the player with an <object> tag).

View 7 Replies

ActionScript 2.0 :: How To Silence Movie At Button Release

Aug 27, 2009

I have a movie that consists of various audio files fading in and out of various scenes as the timeline progresses. The current mute button I've created only appears to stop the audio track currently playing when pressed. How do I silence the movie from the point of button release until the movie has played to the end? Just as an FYI, the audio files are loaded and managed manually on the timeline itself.

View 3 Replies

Actionscript :: Saving Streamed Audio From Mic On Adobe FMS?

Aug 5, 2009

Im trying to capture mic data from a swf, stream it to adobe flash media server, and save it as a wav file. Currently I can only stream the mic data to the server and save it in FLV format. how I can covert it to a WAV or save it as a WAV?

View 2 Replies

ActionScript 3.0 :: Playing Sound (MP3 Or WAV Format) Auto Silence Added?

Apr 3, 2010

When using sound in flash you can also do this with loading an external sound.
my sound.load(new URLRequest("audio/mysound.wav"));
But when you load an .mp3 file the effect of the sounds keeps playing too late. So I discovered that when you save a audio file to mp3 format there is automatically with any sound editor an insert of 1/2 to 1 second of silence. So i read on the web that this does not happen when you save it to .wav formatBut when saving it to wav format i don't hear the sound in flash anymore, only when i save the wav file, with a compression of MPG,but then there is also silence added automatically. What compression technique you should use when saving it to wav format?

View 5 Replies

Actionscript 3 :: Introduce A Sound From The Library To A ByteArray (and Then Play That ByteArray)?

Feb 16, 2011

I am working on a game, made with Flash (using AS3) The game has a fast ball and when this ball hits an object it has to make a sound... but the sound starts with delay (so the ball is far away when the sound is played).This sound is edited by me and it hasn't got any silences at the beginning.The method i'm currently using is the simplest one:

public var sonidoPuntos1:sonidopunto1 = new sonidopunto1()

and then...

sonidoPuntos1.play()

I am trying to introduce the file into a ByteArray and then playing it from there...

View 2 Replies

Flex :: Record Audio And Video At The Same Time Into Flv In Adobe Air 2.0?

Jan 30, 2010

How to record Audio and Video at the same time into flv in Adobe air 2.0 ? So that Video and Audio will be sinchronised?

View 1 Replies

Adobe Media Encoder CS4 Doesn't Encode Audio?

Nov 20, 2008

I'm having trouble getting the Adobe Media Encoder CS4 to work properly. I have tried multiple files of different lengths but end up with the same output. Nice video encoding, but the audio starts and then cuts out after a couple of seconds. The longer the video, the shorter the audio works. The logs don't report any
issues.

View 3 Replies

Actionscript 3 :: Monitor / Change System Audio Volume In Adobe AIR?

Nov 9, 2011

I am making a game in AS3 / Adobe AIR that requires the user to react to certain sounds. Is there a way to inform the user up front if the system volume is muted? Moreover, is there a method to change the volume? If not, does an external cross-platform application exist that lets me monitor the volume and that I can call from Adobe AIR?

View 1 Replies

Actionscript 3 :: Save ByteArray To Mp3 File?

Jul 27, 2010

Well, i am recording the voice from heaphone and the sound data is stored in ByteArray at runtime, now can i stored as mp3 ?i want to save as mp3 file on the client system.. For that, i think i have to use air application..

View 1 Replies

Actionscript 3 :: AIR - From A Swf Path File To A ByteArray

Mar 18, 2011

I am coding an AIR application.

I've got directly a path of a swf file (because it was stored in a xml file). Do yo know if it is possible to get the ByteArray from this file ?

I know that FileReference do that very well, but this class need a select event. But it isn't my case because I've allready got my path.

View 2 Replies

Flex :: Get ByteArray Of File When Uploading?

Apr 12, 2011

There is a WSDL which have one method which take byteArray & fileName(which i want to write) as a parameter to write a file in local system, the following is the code...

public void writeLocation(byte[] byteToWrite, String fileName) throws FileNotFoundException
{
StringBuffer fileLocation = new StringBuffer("D:\Products\Device");

[Code]....

but the flex 2 showing the error when i searched i found out in flex 2 there is no "data" property. so i am unable to create the selected object into byteArray..

View 1 Replies

Flex :: Convert A File To A ByteArray?

May 29, 2009

how to convert a file I have on my server (pdf/excel/ppt) to a ByteArray. The reason I want to do this is to display the dialogue open/save as to the user and I must set the Content-Type to octet-stream. The dialogue shows fine with just navigateToURL() but for pdf's it is the user's local browser setting. For a URLRequest I must set the data as a ByteArray. I'm trying to use the code located here:

Custom printing with Flex

View 2 Replies

ActionScript 2.0 :: Downloading A File To ByteArray?

Aug 10, 2010

I'm trying to download a file and convert it to ByteArray (it's a JPG file from a remote server if it matters).

View 1 Replies

ActionScript 3.0 :: Decoding A Bytearray File?

Feb 2, 2011

I think I have a basic understanding of using bytearray and saving data to a local fileI've been able to save the data (strings) and bring them back.To start off, I have been teaching myself AS3. I have no knowledge of PHP or where to start with that. It has been said many times that you cannot make a txt file from within flash. Unfortunately this is what I need to do.I put together a map labelling app to use at work here. (it loads in a floor plan, then you can add 'nodes' that track info on each office - employee, ext, office #, data line jack, etc.) I would like to use this data in an access database that I have already running.in short, I would like to output my data from the mapper to CSV. On putting the data into a bytearray I am comfortable with marking the commas as well as line ends, but the data is not txt... is there a way to convert it

View 7 Replies

Flash - Locally Cache Audio When Streaming With Sound.load() In Adobe AIR?

Sep 30, 2010

I'm building a mobile MP3 player with AIR, which streams audio using the Sound class's .load() function. I'd like to cache this audio as it's downloaded, to the the user's SD card. Is this possible without having to download the file twice??

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved