It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Flash Forum

preloader w/ sound clips not behaving... HELP!

Moderator: Phate

preloader w/ sound clips not behaving... HELP!

Postby MusicManJP6 on Mon Apr 23, 2007 6:36 pm

I am stuck on a project and need some expert advise! Thus begins my first post here:

I am using Flash Pro 8 and I have a movie clip on the main timeline named 'jingle' that contains 3 sound clips. They are each on a separate layer and are arranged one right after the other. If you play the movie clip, the 3 clips play back to back to create a complete 'jingle'.

The problem is, I want the first sound clip (intro sound) to play while the preloader loads the movie. Once the preloader reaches 100%, the outro sound will play, finishing the jingle. But, if the intro sound clip is done playing and the preloader has not reached 100% yet, the second clip will play AND loop until the preloader reaches 100%, and then finally continue on to the outro clip to complete the jingle.

Seems easy enough, right? WRONG. A week has passed and I am still working on it! It appears that the AS is not even being executed! It blows right by a stop(); command like it is not even there...

Here is the .fla:
http://webtest.itdec.com/roadrunner.../meo_stores.fla

And here is the site itself (on the test server):
http://webtest.itdec.com/roadrunnermarket/

The movie clip in question resides on the frame layered 'jingle' and is also named 'jingle' in the library.

If someone can tell me what I am doing wrong, it would be MUCH appreciated!

Thanks in advance!

Adam
User avatar
MusicManJP6
 
Posts: 12
Joined: Mon Apr 23, 2007 6:34 pm

Postby flabbyrabbit on Tue Apr 24, 2007 10:51 am

Well first, hello and welcome to devppl. I think I will be able to help you quite easily, i will check out your .fla when i get home.

Flabby Rabbit
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby flabbyrabbit on Tue Apr 24, 2007 10:54 am

What is the link to the .fla, at the moment you have it as http://webtest.itdec.com/roadrunner.../meo_stores.fla. Which doesnt seem to work

Flabby Rabbit
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby MusicManJP6 on Tue Apr 24, 2007 12:24 pm

For some reason my link was truncated after I posted.

It should be: http://webtest.itdec.com/roadrunnermark ... stores.fla

Thanks for your help!
User avatar
MusicManJP6
 
Posts: 12
Joined: Mon Apr 23, 2007 6:34 pm

Postby flabbyrabbit on Tue Apr 24, 2007 12:54 pm

I thought so, just checking. Ill look at it shortly.

Flabby Rabbit
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Postby MusicManJP6 on Tue Apr 24, 2007 2:46 pm

Hey, i got it to work! I had to use the following code:

Code: Select all
var introclip:Sound = new Sound();
introclip.attachSound("introclip");
var stillwaiting:Sound = new Sound();
stillwaiting.attachSound("stillwaiting");
var endclip:Sound = new Sound();
endclip.attachSound("endclip");
var beepbeep:Sound = new Sound();
beepbeep.attachSound("beepbeep")

function doneloading() {
   _parent.play();
   beepbeep.start();
};

function notdoneyet() {
   if (percentLoaded == 100) {
      endclip.onSoundComplete = doneloading;
      endclip.start();
   } else {
      stillwaiting.onSoundComplete = notdoneyet;
      stillwaiting.start();
   }
}

introclip.onSoundComplete = function() {
   if (percentLoaded == 100) {
      endclip.onSoundComplete = doneloading;
      endclip.start();
   } else {
      stillwaiting.onSoundComplete = notdoneyet;
      stillwaiting.start();
   }
};
introclip.start();


Using the sound objects instead of the movie clip with sound clips makes the looping section loop seamlessly. I had started messing with this after I started this thread, and just finished it up this morning. Thanks for starting to look at my problem! I think I will stick around here a while and see what I can learn.
User avatar
MusicManJP6
 
Posts: 12
Joined: Mon Apr 23, 2007 6:34 pm

Postby flabbyrabbit on Tue Apr 24, 2007 4:27 pm

Yeah that looks fine, I would have probably come up with somthing the same. Any more problems dont hesitate to ask.

Flabby Rabbit
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England


Who is online

Users browsing this forum: No registered users and 0 guests