dcsimg
A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Why is Scene 1 playing sound from Scene 2?

  1. #1
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796

    Why is Scene 1 playing sound from Scene 2?

    I have a large Fla with lots of layers... anyways, Scene 1 plays a long streaming sound... at the end of it, I put in a "stop();" and the scene waits for the entire movie to load...

    The problem is, when the scene gets to "stop();", I hear the two sound effects that are in the NEXT SCENE! Visually, all it shows is Scene 1. It stays there for a while in fact...

    Why is it playing the next scene's sounds!?!?!?!?

  2. #2
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796

    File added to figure this out

    I have yet to figure this one out, so here is a FLA file demonstrating the problem.

    http://www.sporeproductions.com/sound_prob.zip

    Specifically, when SCENE 1 ends, we hear the sounds from Scene 2. (So basically, you hear sounds started TWICE in a row even though in the timeline there is only ever 1 keyframe for each sound, not two).

    If you add a STOP to the end of scene 1, and it NEVER goes to scene 2, you will still hear the sound from scene 2!!! WHY!?!

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Posts
    1

    Try this

    You're preloading the movie right? so i can't see a reason to use sound in streaming mode, change to Event mode, I think it will solve your problem..

    keep walking :)

  4. #4
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796
    Streaming is required in order to keep the sound effects synced to the cartoon that plays (not shown in the FLA I have up for download).

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    First your preloader ain't working for me and sticks on frame 25... But didn't really looked into that, just skipped your preloader all together.
    Second, can't really explain why (don't ask me!), but you've cut off your streaming sound on the music layer by some 14 or so frames, and your stop action in the "cartoon" scene is even further down on the timeline. If you either prolong your streaming sound (or bring back your stop action), so that there's no more than 2 frames difference between the end of the sound layer and the actual frame on which the stop action is, then the sound from the following scene will not be heard.
    Again, don't ask me why, but I think that since your sound on the following scene doesn't start until the second frame, if there's more than a 2 frame difference between the end of the sound in the previous scene in relation with the stop action's frame, than Flash will go on playing the next streaming sound...
    That's the best explanation I can give you.
    But as I say, prolong your sound track (music layer - or move your stop action backwards) so that there's no more than a 2 frame difference with the stop action and that should solve your problem.

    Also have doubts (not that it would be related to this sound problem!) on your re-introduction of your preloading clip at the end of your cartoon scene! What would be the purpose of that?

  6. #6
    Senior Member Ray Beez's Avatar
    Join Date
    Jun 2000
    Posts
    2,796
    Ok I did something similar to what you suggest, and it does indeed fix the weird bug. Thanks!

    As for your questions regarding the preloading... The first preloader buffers in 50% of the entire movie, then plays the cartoon, then when the cartoon is done, it waits again until 100% is loaded. You see, that FLA you looked at is just a small part of a much bigger game. The cartoon ends up being about 200kb, while the rest of the game is another 450kb. So for a dial-up user, when the cartoon is done, there's still alot of loading to do.

    thanks
    Ray

  7. #7
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    I see said the blind man!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center