Flex :: Play Multiple Sounds With A Custom Delay?

Dec 9, 2009

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.

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Play Multiple Sounds From The Custom Positions (delays)?

Dec 9, 2009

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.

View 4 Replies

ActionScript 3.0 :: How To Play Multiple Sounds

Aug 5, 2010

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.

View 5 Replies

ActionScript 3.0 :: How To Use Multiple Sounds To Play A Single Mp3

Jan 22, 2009

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.

View 1 Replies

ActionScript 2.0 :: Flash - Won't Play Multiple Sounds?

Mar 2, 2010

Okay, so I'm using

Code:
exampleSound = new Sound(this);
exampleSound.attachSound("exampleLinkageName");

[code].......

View 5 Replies

Flex :: How To Play Several Sounds One By One

Mar 3, 2012

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].....

View 1 Replies

Flash :: Delay Between Two Sounds?

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

ActionScript 2.0 :: Removing Delay On External Sounds

Apr 26, 2011

I am building a small quiz in flash, where the user gets a question and 3 answers, that is both shown in text and read as external sound (mp3). I am calling a function to show and read the next answers when the first answer has been read. The text is shown immidately but the sound takes around 6-7 secs. to load......(and it is only 60 kb) how can I avoid this?

My function looks something like this
function readAnswer(){
my_sound=new Sound();
my_sound.loadSound("answer1.mp3",true);
my_sound.onSoundComplete = function() {
trace("answer finish");
//next answer
_root.readAnswer();
}}

View 1 Replies

ActionScript 2.0 :: Delay Before Sounds Start Playback?

Jul 29, 2007

I tried either from code like this:

public function onRollOver()
{
_root.dbg.text += this.beepSound + "

[code]......

View 1 Replies

ActionScript 3.0 :: Slight Delay In Button Sounds During Sound Stream?

Jan 30, 2009

I have some sounds on buttons:

Code:
var mySound:Sound = new myLibrarySound();
myButton.addEventListener(MouseEvent.CLICK, playSound);
function playSound(e:Event):void

[code]....

... and that works fine. I then have some streaming music:

Code:
var myStream:Sound = new Sound();
myStream.load(new URLRequest("myPath.mp3"));
myStream.play(0);

... and that works fine too. Now, however, the initial button sounds have a slight delay -- I'd estimate about 150-250 ms. It's enough that rollover click noises happen about the time you click, and click noises happen about the time you release, etc. Now, here's the KICKER. It only happens in FIREFOX. CURSE FIREFOX. Seriously. I've been having so many Flash issues in FF3, it just drives me nuts. Firefox and wmode is a pain, Firefox and sound is a pain, Firefox has been crap for Flash development lately.

View 2 Replies

ActionScript 1/2 :: Button Sounds In Play Scenes But Not In Play Movie

Oct 11, 2009

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 Replies

ActionScript 3.0 :: Control Multiple Sounds In Multiple Timelines

Mar 10, 2009

Here'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]...

View 7 Replies

Flex :: Setting Multiple Styles To A Custom LabelItemRenderer?

Nov 19, 2011

I made a custom LabelItemRenderer, inside it I want to give some additional style to a StyleableTextField. How can I do it without losing inherited styles? I tried different things, but always got an error saying antiAliasType must be set.

s|List.customListStyle
{
fontFamily: Arial;

[Code].....

How should I set my text field style, and then set it in the createChildren method?

View 1 Replies

ActionScript :: Custom Flex/ UIComponent Keeps Getting Painted Multiple Times During A Resize?

Nov 19, 2010

I've created a custom uicomponent and whenever the browser or its specific container is resized, a repaint occurs but the contents of the component get drawn again and again and again...So, if I move the container I'll end up with multiple circles drawn on top of each other but offset depending upon where the container is when the repaint occurs.My updateDisplayList code is below.Do I need to do some sort of clear so that it doesn't contiuously getting duplicated like this?

override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
trace("height: " + parent.height);
trace("width: " + parent.width);

[code].....

View 1 Replies

Flex :: 4 - Multiple Instances Of A Custom Component Listening The Same Event Of A Parent

Jan 28, 2011

In short: I need an event listener in a custom component so all its instances (without editing them) react at the same time, fired by a dispatched event in its parent container. In detail: I have a custom component with Tab navigator. (The tabs are intended to show different preferences for different Languages.) I have a button bar with buttons for all the languages. There are a lot of instances of the custom component.

I want to click in a button of the languages bar and get ALL the instances switched to the same tab (the custom component contains the logic to change the tab). I can do it by adding the event listener for EACH INSTANCE of the custom component, so it calls an internal function that changes the tab. But it seems to be very coupled, isn't it? I wonder if it can be done in the master CLASS of the component, so it listen for events in its parent container, whichever it is. In my mind this code shoud work, but it doesn't (obviously ill'use a custom event to pass the new language value): this.parent.addEventListener("lang_change", this.change_tab); This way I can just drop an instance of the component, and see it working for itself.

View 2 Replies

Flex :: Usage Of Custom Event With Properties... Multiple Events And Single Listener?

Jan 6, 2010

I have multiple items in my app that I would like the user to click on.Some items are completely different classes.The classes dispatch events and then when the events are captured, some modifications are done to the transform properties of a loosely coupled display object.I want two separate classes to dispatch the same type of event, since I already have an image class that draws images based on a given url... I want the classes to dispatch the events, but then I think I want the difference to be detected when the event comes along... i.e., I would like to recognize the 'origin' or 'sub-type' of the event. Some sort of if/then logic would suffice.

View 1 Replies

ActionScript 3.0 :: Possible To Play Sounds With A .swf?

Nov 26, 2008

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]....

View 4 Replies

ActionScript 3.0 :: All Of Sounds Play At Once?

Dec 20, 2010

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].....

View 1 Replies

ActionScript 3.0 :: Cant Play More Than 32 Sounds At Once

Feb 28, 2010

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 Replies

ActionScript 2.0 :: Play FLV Mute All Other Sounds?

Jun 8, 2009

I 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?

View 2 Replies

ActionScript 1/2 :: How To Play/pause Sounds

Feb 28, 2010

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 Replies

Actionscript 3 :: Possible To Play Chain Of Sounds

Apr 11, 2011

Is 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 Replies

ActionScript 2.0 :: All Sounds Play On Publishing

May 24, 2010

I 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 Replies

ActionScript 3.0 :: Sounds Wont Play?

Nov 16, 2011

Im 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].......

View 6 Replies

ActionScript 2.0 :: Play Sounds On A Key Press?

Jul 28, 2004

I'm trying to play a sound on a space bar press. I am using Flash MX

View 3 Replies

Actionscript 3 :: Flex 4 Disptaching Custom Event From Custom Component (why Flex Converting Custom Event To Mouseevent)?

Mar 2, 2012

This is NOT duplicate of my earlier post (its is slightly different)But this is similar issue with similar error but its not the same error The error I am getting now is below while dispatching the custom event from my custom component

TypeError: Error #1034: Type Coercion failed: cannot convert events::MapEvent@a74ab51 to flash.events.MouseEvent.
dispatchEvent(new MapEvent(MapEvent.CLICKED_ON_MAP));

Note: The error in my earlier post is giving below error message

Type Coercion failed: cannot convert flash.events::Event@81ecb79 to com.events.ShopEvent

The difference here are two things, the earlier error is while converting flash event to custom event and now this one is while converting custom event to flash event and secondly, I have no clue why it is trying to convert to the mouseevent where I am just dispatching my custom event with proper listeners.

This is my custome event

package events
{
import flash.events.Event;
import ui.map.MapElement;

[code]...

View 1 Replies

Actionscript 3 :: Play Sound Without Delay?

Jun 16, 2011

I've got a couple of classes.

My document class (Main.as) instantiates the class player and Soundsloader.
In the player class when the player picks up an item in the game, i want to play a short sound. I do this with the following code: MovieClip(this.main_object.sound_loader).playPickUp();

In my document class i also instantiate the SoundsLoader which basically should load all the sounds. (just one in my sample code below)

package {
import flash.display.MovieClip;
public class SoundsLoader extends MovieClip{

[Code]...

However when i use the methods my swf file freezes for a moment, plays the sound and then continues. So what's the best way of doing this ? (i'm using a .wav sound)

View 1 Replies

ActionScript 2.0 :: Delay Before The Frames Play Again?

Jan 23, 2010

This is what i want to do I have a pause button i want it when the picture clicks on the pause button once it stops the frames when they click on it again it starts the framrs again what code can i use to do this. I also have a back and forward button when that is clicked i want a delay set when they click on the back and forward button and release it I want a delay before the frames play again.

View 2 Replies

Sound: Set Different Volumes For 2 Or Multiple Sounds?

Jan 19, 2003

Iam 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].....

View 4 Replies

ActionScript 2.0 :: Playing Multiple Sounds From Different MCs?

Sep 3, 2010

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?

View 2 Replies







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