ActionScript 2.0 :: Sounds Loaded Into Flash?
Apr 26, 2005
My project calls for a single swf that, sent a filename variable through the page in which it is embedded, will load a mp3 file and play it on demand. Whole process is called streaming. I got that down cold. But visualization! My client tells me that he wants visualization, like in Windows Media Player! Of course, I said, you can't expect something that graphically appealing, out of Flash. But I still must relate some kind of visual aspect to the sound imported, updated only via script.
In fact, I was told by this needy consumer that the little sound-listening console at Flashkit would be a perfect result. Either a bunch of bars, or a windows-media-player-esque wave scope. That's what I need, and I have no idea where it start with getting Flash to detect different qualities of the sound.
The only thing I could imagine would be user-set volume, balance, etc. but that would result in a box being resized by anything the user changes, so it's out of the question.
View 4 Replies
Similar Posts:
Nov 30, 2010
in Chrome on Mac and in Chrome, Opera and Safari on PC, it appears to be playing sounds twice, generating an unwanted echo-effect with a rather random delay(always under half a second though).
I have 2 swf-files that communictes through a LocalConnection, the main swf simply calls a function on the second swf and passing a url to an mp3-file as parameter. The second swf then loads the file and onComplete plays it.
This works perfectly on IE(that's a first) and Firefox on both mac and PC but echoes as mentioned above.
I even implemented a double-check to make sure a sound wouldn't play if a sound is already playing.
Some sample code:
var audio:Sound;
var isPlayingSound:Boolean = false;
var soundURL:String;
[Code].....
View 1 Replies
Nov 17, 2009
I'm loading SWF B into SWF A... SWF B has sounds in it's library that have been exported for actionscript. Can I access those from SWF A? And if so, how?
View 5 Replies
Feb 17, 2005
I exported sounds into subMain.swf and when I publish the movie, and I tell them to start,they do. But, when I load subMain.swf into my main.swf and I tell them to start from there, they don't.
View 3 Replies
May 27, 2005
I'm really at loss here (6 hrs straight and liters of coffee and i cannot indetify the problem) and I would REALLY really appreciate your help-- A LOT *sigh* Here's the scenario: I'm tying to build my new flash site as modular as possible (learning from past mistakes). Among others, I'm importing a MC containing all menu functions onto the main timeline via loadMovie(). This mcMenu.swf also contains the sound effects for the menu which are being attached via actionscript in the first frame:
[Code]....
View 6 Replies
Feb 17, 2005
I exported sounds into subMain.swf and when I publish the movie, and I tell them to start, they do. But, when I load subMain.swf into my main.swf and I tell them to start from there, they don't.
View 3 Replies
Feb 28, 2010
However when doing so it then has to load this sound file even before the preloader can display. One work around I've used before is to make a swf that just loads the entire second swf. This ensures that everything will be loaded at the start.However, if possible I would like to avoid this. I know that if i place the sounds on the stage (after frame 1) the preloader works fine, but at that point Im unsure how to access them within my as3 files.So if anyone knows how to ensure the sounds do not get loaded before the preloader starts and I am still able to control them via actionscript.
View 1 Replies
Jan 10, 2010
Im using loadMovie within a .swf on level 1 to load an external movie into level 2. But when this happens the sound function doesnt work. The 2nd movie being loaded has the newsound defined and everything within itself. It plays if i run that swf seperately or using ctrl+enter. Yet when the 1st movie calls the 2nd movie onto level 1 at runtime.The sound in the 2nd movie doesnt play. But its button sounds all seem to be working.
View 1 Replies
Apr 16, 2010
I followed the mp3player tutorial (part 3) from [URL] and got it working fine. Only problem is that the setVolume I'm trying to use with my music is affecting all my other sounds - button sounds and background sound. I'm aware of the createEmptyMovieClip/attachSound approach and got it working on my other sounds. But Lee's tutorial-mp3player is using a slight different technique, and so my normal approach doesn't quite work.
[Code]....
View 7 Replies
Feb 7, 2011
I want to synchronize sounds perfectly to do a kind of Audio Mixer, using different sounds. [URL] does it perfectly, I've been researching and researching and I just don't know how to do it! How does [URL] synchonize audio so perfectly? you can even change sounds and the new ones will come on time! How do I do that? Is it just Action Script? or something else?
View 1 Replies
Nov 29, 2009
I have a film with 4 scenes in it: Here's a link to the film and as you can see the film does not play the music the second time because of the StopAllSounds function which is probably the wrong code to use. The first scene is just a button with 1 frame, a stop action and a music clip. The second scene is the film. The third scene is the credits fourth scene is a Play again button. I have a Stop all Sounds action on the fourth scene because if I do not use it and I press the Play Again button, the music from the first song keeps playing but also the music from the film starts up again so it starts to play twice. What I want to know is, how do I get the music to stop at the end of the film but start up again once I hit Play Again?
I am using Flash CS3 if that helps and using Actionscript2.
View 2 Replies
Apr 14, 2004
Is it possible to target a loaded movie within the main timeline and stop sounds in that particular movie only?
View 4 Replies
Jul 5, 2009
how do u add sounds in your flash?im using macromedia flash pro 8
View 3 Replies
Jun 3, 2011
ask:i want to create an audio sequence.there are 8 predefined sound-starting-points in the timeline.for each starting-point, the user can select wich sound is played (dropdown menu).when the user made his choice for all the 8 bars.actionscript should gather this information and create a fluid sequence of these 8 sounds.then there will be a "play" button available for the user to start the sequence.the sounds don't have to be synced to a button or so.there is time for actionscript to put the sequence together.problem:when i put two sounds directly one after another in a movieclip, there is no delay between the sounds, which is exactly what i want, but i can not control which sound is played through actionscript.when i use actionscript, there is a delay between the sounds.here is what i tried with as.this is placed in the frame where sound2 should start
if (_global.Sound2 == "Piano" {
var SoundA:Sound = new Sound ();
SoundA.attachSound("Piano.mp3");
[code].....
View 1 Replies
May 4, 2009
I need to turn off/on all the sound for a flash animation. The flash control contains a layer named sounds that has 5 sounds associated with it in keyframes at different time. How can I simply turn on/off everything using a symbol button.
View 2 Replies
Sep 15, 2010
I am using Soundbooth to record some sounds. I'm trying to save them as either a MP3 or WAV,but no matter bitrate I use for either file type, I get an error when I try to import it into Flash. I have the newest QT installed from the wormy fruit vendor, does not make a difference. I can save it as an .asnd and import it just fine, but that file type is huge.The files that give me the error open just fine by themselves in WMP
View 4 Replies
Oct 21, 2010
If i use sounds in a flash file, sometimes the fps will slow down. How do you get around this?
View 1 Replies
Mar 30, 2010
I have a main swf which has sound on/off buttons. It has many SWF's which are loaded into different placeholders at different time. All of them have different sounds in them. In addition to that there is a music loop going on in the background.Now, this perticular swf lets call it Father will be placed in some swf later on. What I'm trying to do right now is when the sound off button is pressed turn off all the sounds permanently so the child swf's and their sounds stop too.I have found a way in AS2 :
global = new Sound( ) //no movie clip target path.
and add the following code to your off button.
on(release){
global.setVolume(0); //mutes all sound
}[code]....
which ofcourse does not work for AS3. So how can I stop all sounds permanently in AS3? Secondly what if I have one sound (my background loop) which I want to keep going on.
View 2 Replies
May 24, 2011
i want to have the music always playing and the ability to mute different parts. It is for a project where you click on different people and they come to life to play music. a stop and play would not have them in snyc. I have not been using action script long
var my_sound:Sound = new Sound();
my_sound.load(new URLRequest("triumphant.mp3" ) );
function setMute(vol){
var sTransform:SoundTransform = new SoundTransform(0);
[code]....
View 1 Replies
Aug 31, 2011
I'm quite new to actionscript 3, but have been playing with some code to generate beeping sounds in flash. It's quite fun, however, I am trying to find a way to space the beeps out for example, having a beep play for one second, followed by a one second break, before another beep plays.
Code:
import flash.media.Sound;
var mySound:Sound = new Sound();
[code]........
View 1 Replies
Feb 7, 2007
I have some strange problem while using more than one sound that I want control.
Code:
var myMusic:Sound = new Sound();
myMusic.attachSound("music1");
myMusic.start(0, 999);
myMusic.setVolume(50);
[code]....
When I try to reduce sound volume of 1 sound, volume of all sounds is beeing reduced?!The same situation is when I use tween comands like: this.myMusic.volumeTo(5, 1, "linear");
View 1 Replies
Jul 15, 2003
how do u make something in flash, a file without frames or tweens, have it randomly loop sounds that are in its library? is this possibel?
View 6 Replies
May 4, 2010
I'm working on a game in Flash, and everything's going along great, until I start trying to play sound effects. The minute I start trying to play a sound, the whole app seems to "hiccup", frames get dropped, and things generally get ugly for a little bit. I'm loading sounds by copying them into my Flash CS3 library, exporting them for ActionScript with a Base Class of flash.media.Sound. I'm playing them through a class that looks a little something like this...
Code:
public class SoundPlayer {
private var _mySound:Sound;
public function SoundPlayer() {
_mySound = new ExampleGame.SoundFromLibrary();
} public function playSound() {
_mySound.play();
}}
This all seems pretty straightforward, so I can't figure out why Flash is complaining when it first tries to play the sound. The sound itself is a 40k. mp3 file that lasts about 2 seconds. Not the shortest sound in the world, but I'm sure I've heard larger sounds in games.
View 3 Replies
Aug 13, 2009
I have a question for stopping all sounds in flash project. And i mean all, buttons, effects, etc..The thing is, I have manually placed various sounds on different frames, on different MCs and buttons inside my flash.Is there any function that will just mute my sounds, or I have to create object for each sound?
View 1 Replies
Mar 19, 2010
I have to have relative paths to the sound file assets but for some reason when I change them they are all absolute. Even when the file is in the same directory as the .fla.How can I change the path to sounds in flash to relative?
View 1 Replies
Jan 23, 2012
I have 100 swf embedded in a page. The swf are various forms of individual audio playbacks.- an swf button that loads an swf into it that has audio on a timeline streamed. AS3
- swf that has streamed audio using scripting so there is no preloading. AS2Since I have 100 and the user could press all 50 at a time and have this giant noise of sounds and bog down their bandwidth. Is there anyway of:- stopping all playing of swfs that has streamed audio using timeline. I guess that could be like a ALL stop frame command??- stop all sounds coming from the streamed audio swf
View 11 Replies
Jan 26, 2009
I think this might be a tough one: Is it possible to stretch the playback of an MP3 file using Actionscript? Time stretch is when you slow a sound down but don't change its pitch. Basically, it works by chopping up the sound into milliseconds and splicing duplicates of the bits in, thereby stretching the sound.
View 1 Replies
Sep 27, 2011
i'm a little noob about As3 indeed i'm three days since my first exam on flash, and i'm almost done completing my personal site.
I have followed a tutorial to built a simple music player with play stop and mute buttons and only one track loaded. And it's working fine when i try the site on my computer, but when i upload the flash site on altervista and test it online the track file isn't loading
[Code]...
View 5 Replies
Jun 11, 2005
im having problems putting sounds in my flash game....im using flash MX and im making a tile based RPG game ....i got the background music playing in the first map...but when my character enters the second map, the music stops and play all over again in the beginning.....i want the music to be continously playing while the character is on map 1 and map 2...how can i remedy this? im using this simple A.S for the bg music in map 1:
[Code]...
i tried to remove the line stopAllSounds();....as a result, the music became overlapping when the character transfers from one map to another. Also is there any other way to make maps easier?. coz ryt now im using 2-dimensional arrays for my map....i only have two 640x480 maps now and it's starting to get confusing editing them
View 3 Replies
Mar 2, 2010
Okay, so I'm using
Code:
exampleSound = new Sound(this);
exampleSound.attachSound("exampleLinkageName");
[code].......
View 5 Replies