ActionScript 2.0 :: Flash - Won't Play Multiple Sounds?
Mar 2, 2010Okay, so I'm using
Code:
exampleSound = new Sound(this);
exampleSound.attachSound("exampleLinkageName");
[code].......
Okay, so I'm using
Code:
exampleSound = new Sound(this);
exampleSound.attachSound("exampleLinkageName");
[code].......
I am making a slide show, for every image i want sound on it. For example if it the "Tiger" in the image, it says "Tiger". I have all the voice in .wav format.
Right now my slide show is xml based and in as3, i have made another attribute for voice.
Let me know how i can play different sounds for different images.
I have figured out how to play a sound with AS3, but i cannt figure out how to use multiple sounds. to play a single mp3, i am using this:
Code:
//number that is redefined when the pause button is hit
var pausePoint:Number = 0.00;
//a true or false value that is used to check whether the sound is currently playing
[Code]....
but what I need to do is have 4 different mp3's, each with its own stop & play button, so the user can play any file they want. These are voice over reels, not music, so each needs its own set of buttons.
I need to realize a multiple-track player. The user can upload multiple tracks and mix (play them together). My problem is to allow the user to define an exact start position of each track to allow a synchronization between them, something like this:
Track 1: start at [x] sec.
Track 2: start at [y] sec.
play/stop
where the user can set the x and y. I've tried to realize it with AS2 (using netstream and setInterval) and AS3 (using netstream or sound and timer). Only if I set the same x and y both tracks are playing simultaneously.
I need to realize something like a multiple track player. The users can upload multiple tracks and start to play them together. My problem is to allow the user to define a start position of each track to allow a synchronization between them, something like this:
Track 1: start at [x] sec.
Track 2: start at [y] sec.
play/stop
where the user can input the x and y. I've tried with AS2 (using netstream and SetIntervall) and AS3 (using netstream or sound and timer). If I set the same x and y both tracks are playing simultaneously. But not if the x and y are different.
i seem to be posting a lot at the moment but i am trying to get my Flash Skills up to date, hope im not annoying anyone too much. Basically i have a small project where pressing a button will trigger a sound, So when i click 'Button1' it plays the sound assigned to 'Button1', I have done this like the following.
[Code]...
Eventually i am going to have 20 different sounds, i know i need to probably assign each sound to its own individual sound channel. i tried manipulating the for statement to say something like var [i]Channel = new SoundChannel; in the hope that it would assign a number next to the SoundChannel thus making it unique,
I have 3 sounds that i would like to play, they are in my library.I can play any of of them using soundName.start(0,1) with the code below:
firstSound = new Sound();
firstSound.attachSound("Sound1");
secondSound = new Sound();
[code].....
I have two buttons on a single frame that each play seperate sounds when clicked though actionscript is throwing up this error and I have no idea how to fix it.
1151: A conflict exists with definition snd in namespace internal.
1021: Duplicate function definition.
Warning: 3596: Duplicate variable definition.
[Code].....
I have five different scenes all including three different buttons. When I test the buttons in "play scene" - all buttons sounds correctly in all scenes. But when I play movie, there is sound only with one button (the same button in every scene). I have looked for differences, but this button seem to have all the same parameters as the others.
View 10 RepliesI Am wondering if is possible to use one sound channel to play through an array of sounds? Perhaps by using a complete event or other means?
View 1 RepliesI making a presentation with an interface on flash next and prev buttons im using scenes for the different slides on the presentation, all of them have audio on it, my question is how do i prevent that the audio from the prev scene to play on the new one?? i should say that on each scene there is an animation with the sound on it
View 3 RepliesHere's the setup:
-I have a music score that will be streamed in via actionscript
-I also have multiple short sounds (SFX) in multiple nested MCs
-these SFX sounds are customized using the ide edit interface, so it would be a pain to use actionscript to play each sound
What I need: To have 1 mute button for the music, and 1 mute button for the SFX, both on the root timeline.[code]...
I have several sounds, how can I play them one by one. When I just use play(), the sounds play simultaneously. I also tried to handle SOUND_COMPLETE event, but it doesn't work.
sampleMP3A.play().addEventListener(
Event.SOUND_COMPLETE,
function(event:ResultEvent, o:Object):void {
[code].....
I have an AS2 .swf that I'm loading into an AS3 file. The AS2 .swf uses the old AS2 Sound Object, which of course works fine when I play the AS2 .swf directly, but when I load it into the AS3 file the sound stops working. Everything else in the AS2 .swf works fine. I'm loading the AS2 .swf with this:
Code:
// Load AS2 .swf into AS3 holder
var myMC = new Loader();
[code]....
Now all of my sounds are playing at once! Each symbol has its own MP3 file in it (MP3 file names are the same as the symbol names for ease, so smokescene.mp3 goes with smokescene and etc.)
import flash.events.MouseEvent;
// make the characters invisible
birthdayscene.visible = false;
dancescene.visible = false;
[Code].....
can somebody explain me this 32 sound channel limit, i am not sure i quite understand it..does this mean i cant play more than 32 sounds at once, or i cannot externally load more than 32 sounds (without actually playing more than 1 in any given time)?i am saying load because i am planning on preloading multiple sounds and have them ready for playback as soon as i want.
View 1 RepliesI have some background music playing on my website and when I click to play one of my FLV on the site I want to background music to mute. Also when the FLV is finish (complete) the background music back on.
how to do this, I'm a little rustly on this but know it is easy to do, seen it done many many times?
I have several swf file that will be loaded into the main swf file. In the sub swf file I coded & attached sounds and play it. And the problem is that when it is loaded in the main swf file the play/pause button won't work.
View 9 RepliesIs it possible in actionscript 3.0 to play chain of sounds (i.e. several mp3s)?Or should I manually start playing first sound, wait for SOUND_COMPLETE event, then start second sound and so on?
View 1 RepliesI am new to flash and have made a presentation in Flash 8 using preloaded presentation formats.i deleted all the codes in actionscript that were there in the template.Now when i publish my presentation, sounds of all screens start to play together in the first screen.
View 1 RepliesIm testing out playing sounds, I've looked at lots of articles and I feel my code is correct but no sounds are playing.Declare
ActionScript Code:
var testSound:Sound = new Sound(new URLRequest("sfx_test.wav"));
var soundChannel:SoundChannel = new SoundChannel();
[code].......
I'm trying to play a sound on a space bar press. I am using Flash MX
View 3 RepliesIam searching vor solution so adjust different volumes for multiple sounds. That means:
Sound1 Volume 100
Sound2 Volume 20
I have tried that with the following script:
DayNature = new Sound();
DayNature.attachSound("Day_Nature01");
DayNature.setVolume(100);
[Code].....
Working on a project with multiple sounds (all contained in different MCs) played by different key board events. Most of it works, but when I try to use simultaneous 2 button combinations to call upon a different sound, all 3 sounds play at once. The 3 sounds are as follows: the sound associated with the first button, the sound associated with the second button, and the sound associated with the 2 button combo. I've made several different true/false statements to override different events and states, but they don't affect the playing of the MCs. I've also tried using attachSound but I don't like the results I'm getting from that either.
How can I stop the first 2 sounds from being played, so only the 3rd sound can be heard?
im am using this script in my current movie to attach sound using acttion script it also has a stop/start button but i need to now how to add multiple sounds in this way.
[Code]...
In my app, scenes on the stage play based on user interaction, and are accompanied by sound clips that are loaded through a soundLoader class (see below). I can play the correct track from the model, but I can't figure out how to correctly write a loadTracks function that will proload all of the track options for a given scene, and then play the correct one based on what the user clicks without a pause. How would I preload and store those sounds in a way that I can use them when needed?
Code:
package mvc
{
import flash.display.*;
import flash.media.*;
import flash.events.*;
[code]....
I have a website that has two flash items on it. I have a swf that calls mp3s that plays on the page load, and I have a FLV that plays on page load. What I would like to happen is: on page load the FLV plays when the FLV Finishes the swf starts to play the mp3s. What already happens is that the pages load in _blank pages so they are in new windows. This is good because while you navigate the site, the music from the homepage is still cycling through the swf's mp3 playlist. The problem comes in when you navigate back to the homepage from a new window, and the homepage is still open within the first window. That means that the video plays over, while the music is playing, and the music doubles up. Now the video playing isn't bad, it's that music is doubling up. Can't it sense itself playing a 2nd instance of itself on another webpage and stop it?
View 3 RepliesI want to push a button, and play through the entire array one sound at a time. When the first sound stops, the second begins, etc. all the way until the last sound plays. When the last sound finishes, all sound should stop, and if you push the play button again, it should start over at the beginning, and play through all sounds again.
I'm thinking the SOUND_COMPLETE needs to be used... I'm just not sure how, hence the empty function. I only want to have to push play one time to hear the entire array in a sequence.
var count;
var songList:Array = new Array("test1.mp3","test2.mp3","test3.mp3");
count = songList.length;
[Code].....
I really do not know how to begin but I have 5 sounds that have been saved in the library with the following linkage names[code]...
How do I place these in an array and have them play in order from explode_sound to explode_sound4 (once one stops playing go immediately to begin playing the next one)? I'd like to add a 2-second delay before the next audio clip plays though.
Can I use attachSound method to load 2 or more sounds to play at the same time? If yes, how?
View 2 Replies