ActionScript 2.0 :: Create The Sound Seeker In Flash?
May 18, 2009create the sound seeker in flash (actionscript 2.0)..
View 1 Repliescreate the sound seeker in flash (actionscript 2.0)..
View 1 RepliesIs there any AS3 library or code-snippet that can create altered versions of a Sound object on-the-fly (at runtime)? Either based on:
An existing Sound object; A ByteArray object;
For example, say you have a "dry" sound of a gun-shot. You could:
[Code]...
music seeker bar, the code i am using is
[Code]...
It's possible to play a sound file through AS, either by loading it from a folder or import it to flash. It's also possible to play a dynamic tone with flash.media.Sound + writeFloat.
But... is it possible to play a sound file with flash.media.Sound + writeFloat in some way? I want to play a sound file without having to deal with any files except the .swf!
I need to create a basic bar chart distribution in ActionScript 2.0 based on sound output. I realize that ActionScript 3.0 has a very nice sound visualizer class SoundMixer.ComputeSpectrum but the limitations of my project require me to use ActionScript 2.0. Im wondering if you know of
A. Any third party libraries that I can use or purchase to create basic visualization effects based on sound output in AS2
B. Whether it is possible to create the sound visualizer in ActionScript 3.0 and somehow import/embed the AS3 file/swf in the AS2 file but allow the AS3 file to read from the AS2 sound
now, i need to add a "seeker" function where i don't have to use my scrubber to scrub on the progress bar but i'll just to click on any part of the progress bar and the scrubber will go towards it and play.
this is how i play my video file:
Code:
function playClicked(e:MouseEvent):void {
if(!bolLoaded) {
nsStream.play(strSource);
[Code].....
I'm trying to create a visual waveform for an MP3. The code I've included is called on successful load of the MP3. I intend to extract just a few important samples from the sound to create the waveform, rather than extract the entire sound into a bytearray. Even on a good machine, extracting an entire song can cause flash to freeze up for 3-5 seconds (or longer!). For my purposes, this isn't feasible.
Unfortunately, the code I've got below is failing to produce any numbers. If I extract the entire song it functions, but extraction of just the key points is giving me nothing. Does performing an extract make the remainder of the sound object invalid for future extracts? If so, is there some way around this that won't freeze flash for an extended period of time during the extract? Some important variables from the rest of the code:
[Code]...
So I want to create sound sequencer in flash with as3.
I guess I would need to use some sort of array with all the sounds, then on enterframe I would check my grid, with ticked boxes and play the sound if it is ticked and playhead is over the particular piece on a grid....
Here's the screenshot of what Im trying to make.
I'm trying to create a background sound in flash website. I created play/pause buttons and it works fine, but when the sound is over it stops. What I want is the sound to loop, not to stop. I tried different things but I can;t get it working as I wish. Here's my code:
Code:
var mySound:Sound = new dogg();
var myChannel:SoundChannel = new SoundChannel();
myChannel.addEventListener(Event.SOUND_COMPLETE, whenComplete);
function whenComplete(evt:Event):void
[Code]...
I wonder how to create a timeline for my sound that i attached to a variabel. And then how to control where in the timeline the sound should play.
View 3 RepliesI need to create a sound select board. There are 6 buttons; 5 which contain music, and one which will silence the music. Each time you push each button, the previous music will stop. The first button's music will start automatically.
View 1 RepliesI am using actionscript 2.0 and I am trying to create multiple sound buttons that trigger multiple different .mp3 files via mouse click.I have gotten it to work with one sound file using this actionscript [code]but as soon as I add another button and try to link it to another file it does not work.I would like to make it so that even if I click another button to start another sound, the first sound keeps playing.
View 1 RepliesHow to create sound object dynamically in one movieClip.
Example
for(i=1;i<5;i++){var sound + i = new Sound();}
My issue is that I have 10 small audio clips and I want to make them into variables that i can access later in the code. But I'd be happy if I didn't have to write the same code 10 times down over and over to create/access them.[code]...
A question on the side, is there any built in sound generator in actionssccript 3.0?
I need to create an audio file (sine wave) of a particular frequency. I need to do this in actionscript 2.0.
View 0 Replieshow to use actionscript loops to loop things, like sounds for example. Can someone show me how to create an infinit loop for a sound. If you can a step by step thing would be nice since i am a TOTAL newb at actionscript, i can do the other things in flash but the actionscript messes me up. And for the loops, what frame do i put it in in the actionscript if i want to to go throught the entire scene?
View 6 Replieswhy does this not working?
for (i=0; i<=numVoices; i++) {
var this["voice"+i]:Sound= new Sound();
}
[code]......
I have a project that requires me to display the waveform for a uploaded sound. The sound is always an MP3, most of the time 22.05 kHz mono, with speech only. The project are written with Flex/ActionScript 3. It's meant to run in the browser, but might also consider converting to AIR if that can help.
All examples I've found and looked at for generating a wave, are either doing some visualization in real time as the sound is playing, or, the most promising, as3soundeditorlib, keeps the wave already generated, but does it very slowly, seemingly using as long time as playing through the audio would've taken.Is there any way to generate the wave faster than real time?
I have some sounds in my library. They are all exported and have been given class names like C, D, E etc. I have another class that represents a button. This class stores a reference to one of the Sound in my library. I set the type for this variable to Sound. When I try to set it I get the error: cannot convert C$ to flash.media.Sound I try as Sound, for example key.note = note_array[p] as Sound; The value ends up as null.
View 2 RepliesThis is what I try to do: I am creating a game with spoken sentences. These sentences are loaded dynamically from an XML file, which contains the paths to mp3-files.This is what is currently happening: All sentences are spoken at the same time.I want them to be spoken one after another - how to I obtain this requirement?This is my (simplified) code example:
import com.hydrotik.queueloader.QueueLoader;
import com.hydrotik.queueloader.QueueLoaderEvent;
_oLoader.addEventListener(QueueLoaderEvent.ITEM_COMPLETE, onItemComplete,false, 0, true);
[code].....
Just wanted to ask, is it at all possible to create sound spectrum from the data that RTMP server streamed? I read this computeSpectrum and it says
"In addition, this method cannot be used to extract data from RTMP streams, even when it is called by content that reside in the same domain as the RTMP server."
I will not be using FMS so it stays inpossible. Are there any available hacks with php and the server or whatever?
I know global variables are supposed to be bad but is it possible to create global classes? I am creating an application and I want to have one class that handles sound. From any class I would like to be able to say soundhandler.playSound(); without having to pass references all over the place. It should just know it is there.
View 1 RepliesIt appears my sound is off sync and the longer I play the movieclip, the farther off sync it goes. Its nothing too complicated, just some basic shooting sounds that fire every time I hit the space bar. My code is below:
package com.objects{
import flash.display.MovieClip;
import flash.media.Sound;
import flash.media.SoundChannel;[code]....
The Attack() method gets called from another class that handles all keyboard controls.when it gets called the sound then plays.firesound and firesound2 are almost the same. firesound2 sounds a little off pitch to make it sound more realistic.At first the sound sounds pretty good, not great. but then it gets terrible as time passes.
I made a new .fla project. and I attached the following class to it by it self. so the following is the only code in the entire .fla project and the issue still occurs. I press the spacebar and the sound starts a day late.
package {
import flash.display.MovieClip;
import flash.events.*;[code]......
I'm trying to play a sound using a technique found here (play the sound by sampling raw sound data gathered from the original with extract()), with the difference that the mp3 sound is embedded in the swf, not loaded externally. This is my code:
var soundBytes:ByteArray = new ByteArray();
var mp3sound:Sound = Sound(new Sound1_design()); // this is the embedded sound
mp3sound.extract(soundBytes, int.MAX_VALUE);
[Code]....
This works, in a way, except that the resulting sound is distorted (it has a kind of a metallic ring).
I am trying to create a sound spectrum analyiser, or as I call it, audio visualization. I have seen many examples, including the competition held on this site. However, I have yet to find anything on real time audio, whereby the spectrum reacts to sounds it hears rather than pre compiled songs. provide me with links to some tutorials on real time sound spectrums
View 2 RepliesIs it possible to create a button that when you press it and hold it, it will play a sound, and when you release it then stops the sound?
View 2 RepliesIs it possible to take two Sound objects and combine them into one Sound object so that one Sound plays, and then the second plays right after it? I can just play the first Sound and then the next right after it, but it would be much cleaner to combine them before playing the audio.
View 1 RepliesTo create loader for external swf that will have features to enable/disable sound and to enable/disable external link requests.I don`t have source files for that external swfs.
View 2 RepliesI've been messing with this for almost six hours now and am at the end of my wits. I need a flash mp3 player that follows the following guidelines:
*all encased within its own movie clip
*loads four different songs, one after the other (event)
*each song displays its own loader
*user scrolls through song selection and plays available (loaded) ones
*first song plays when loaded and continues to the others
any tips on where to go with this? do I create four different sound objects since later songs are loading while the first are playing?
I am triggering short sounds dynamically from the library for a game (Specifically Air for Android). When the user clicks a button the sound can take up to 600ms to actually play. I have set it for any silence before the actual sound by calling the sound like so:
[Code]...
All return the same results. I know there are threads here that talk about this but none have offered a real solution that I can find. Is there no way to cache the sound or store it in a buffer?