?
Solved

gapless sync and playback  audio as3

Posted on 2013-05-19
1
Medium Priority
?
364 Views
Last Modified: 2013-06-12
I have 37 sounds that are all the same bpm.  I would like them to sync with each other when their button is clicked to be played.  
Currently I sync the sounds to a background sound using the sound_complete listener. It works but
the sound become slightly out of sync becuse I am relying on the flash sound_complete event listener.   If I just loop them play(0,9999); they loop great but I cannot sync them with each other.   Any solutions to this?

var sndSync:Sound = new b3();
var chnSync:SoundChannel=sndSync.play();
var myVolume003:Number=0; 
    var myTransform003:SoundTransform=new SoundTransform(myVolume003); 
        chnSync.soundTransform=myTransform003; 
		
chnSync.addEventListener(Event.SOUND_COMPLETE, loopSoundf);
function loopSoundf(e:Event):void{
	   
		chnSync = sndSync.play();
		chnSync.addEventListener(Event.SOUND_COMPLETE, loopSoundf);
		chnSync.soundTransform=myTransform003; 
		  
	}
	
	syncer.addEventListener(MouseEvent.MOUSE_DOWN,soundonlySync);
	stopper.addEventListener(MouseEvent.MOUSE_DOWN,soundonlySync);
function soundonlySync(event:MouseEvent){
		chnSync.stop();
		chnSync = sndSync.play();
		chnSync.soundTransform=myTransform003; 
		chnSync.addEventListener(Event.SOUND_COMPLETE, loopSoundf);
	}

Open in new window

0
Comment
Question by:ForLoop5
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 23

Accepted Solution

by:
tailoreddigital earned 2000 total points
ID: 39179820
This is kinda a long thread, but very informative.   It goes into detail about multiple audio within Flash and synching it.    At the end of the thread a poster offers a solution using Pixel Bender.

This might point you in the right direction,
http://forums.adobe.com/message/2522272?tstart=0
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question