Copy link to clipboard
Copied
I created my first Flash CS6 AS3 program "pacman" during my 30 day trial - which just ended. It works on my desktop, but the sound lags when it's on a server. I declare the variables. Later I assign them. I then play the sound by calling a function with paramater "1". (There are several sounds, the examples below just show the code for the Begining music).
Is there some online documentation that could help me properly implement sound in my app, or is there a simple way to sync the sounds to the animation?
Thanks for all.
G.Doucet
// Sound Variables
private var sndBegin:Sound=new Sound();
private var chBegin:SoundChannel=new SoundChannel();
var req:URLRequest=new URLRequest("pmBegin.mp3"); // Load music into variables
sndBegin.load(req);
public function spBegin(p1:int) {
if (p1 == 0) { chBegin.stop(); } //--------Stop Music
else { chBegin=sndBegin.play(); } //--------Start Music
}
Copy link to clipboard
Copied
It is extremely difficult to sync animations with external streaming assets. You are better off embedding sound into timeline - this will assure complete sync.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now