Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Looping different sound files in flash

Posted on 2003-02-19
3
Medium Priority
?
179 Views
Last Modified: 2010-04-03
I have 15 samples ranging from .4 sec to 26 seconds.
I have put them all in the timeline some of them looping. transitions are smooth in winamp, but in flash everything is screwed up. for some reason working with the onSoundCompleted  doesn't do the job ( when i tried that i did not play them from the timeline rather creating soundobjects) but i don't know what to do know. all sounds are event triggered and sync is given because of a relatively very small (200 kb for 2 minutes) silent streamsound but still i can't position the sounds exactely right. I tried to "draw" it

----------------------------------------------------
*-/\-/\-STREAM/\-/\-/\-/-\/-\-/\-/\-/\-/\-/\-/\-/\-/
----------------------------------------------------
*-/\-Sound1-/\                       *-/\Sound3-/
----------------------------------------------------
                         *-/\Sound2-/\
----------------------------------------------------

these are 3 layers
* = keyframe
0=emptyframe
-/\-/\= the sound
as soon as one file stops the other continues (no pauze, no overlap)
sound 1 is a soud file of .4 sec which is looped 29 times
sound 2 is a sound file of 3 sec which is played once
sound 3 is a soud file of .4 sec which is looped 13 times
all sound files have the same bpm and all contain the beat so if they are offset it is noticed immediately.



0
Comment
Question by:Tomekoreo
3 Comments
 
LVL 6

Accepted Solution

by:
henryww earned 600 total points
ID: 7983522
i wonder why the onSoundComplete didn't work!


//this is what i tested on my computer with flash mx

//frame 1 - get all sound from the library
s1 = new Sound();
s1.attachSound("mySound1");
s2 = new Sound();
s2.attachSound("mySound2");
s3 = new Sound();
s3.attachSound("mySound3");
s1.onSoundComplete = function() {
   s2.start(0,1);
}

s2.onSoundComplete = function() {
   s3.start(0,13);
}

// some frames later - (my text frame 20)
// when the movie plays
s1.start(0,29);


// well ... it works ok for me ...
// but i don't have any movie playing ...
// maybe that's why!!!

0
 
LVL 7

Expert Comment

by:kanary
ID: 9304361
hello Tomekoreo.

do u still need help in this issue, i can help u if u would like.
just specify ur erros plzz

kanary.
0
 

Author Comment

by:Tomekoreo
ID: 10609859
it's easier to give the points than to close the question
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

572 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