maskedMan
11-03-2008, 05:13 AM
So, I'm starting to become truly frustrated with a combination of two pernicious aspects of Flash CS3. One of which, the way it handles sound, there's not much to do about... but it gets worse when coupled with this:
So, let's say you have a main timeline that is 10 frames long, and each has a keyframe containing:
someClip_mc
- Which contains someClipChild_mc (a clip with a sound on the timeline starting on frame 2. Frame 1 has a stop action to prevent sound from playing).
Each instance of someClip_mc, s well as the someClipChild_mc inside it is from a different library item, so we have ten different sounds on the timeline.
Now, on your main timeline do this: gotoAndStop(10);
And now all of a sudden you hear a cacophany of sound! It is as though gotoAndPlay(10) caused flash to instantiate every clip that exists on frames 2 - 10, but then before the clips have a chance to execute their frame scripts they are 'removed' from the display list if they ever existed in the display list at all. Since the default action of a movieclip is to play, this is exactly what those nested clips do and because they aren't on the display list they don't execute the stop() action on frame 1! The same can happen if you "gotoAndStop(1)" from frame 10. Any time you use gotoAndStop() it seems to provoke this behavior if you use it to skip over frames in any direction.
So... why in the world does this happen? How can you stop it?
So, let's say you have a main timeline that is 10 frames long, and each has a keyframe containing:
someClip_mc
- Which contains someClipChild_mc (a clip with a sound on the timeline starting on frame 2. Frame 1 has a stop action to prevent sound from playing).
Each instance of someClip_mc, s well as the someClipChild_mc inside it is from a different library item, so we have ten different sounds on the timeline.
Now, on your main timeline do this: gotoAndStop(10);
And now all of a sudden you hear a cacophany of sound! It is as though gotoAndPlay(10) caused flash to instantiate every clip that exists on frames 2 - 10, but then before the clips have a chance to execute their frame scripts they are 'removed' from the display list if they ever existed in the display list at all. Since the default action of a movieclip is to play, this is exactly what those nested clips do and because they aren't on the display list they don't execute the stop() action on frame 1! The same can happen if you "gotoAndStop(1)" from frame 10. Any time you use gotoAndStop() it seems to provoke this behavior if you use it to skip over frames in any direction.
So... why in the world does this happen? How can you stop it?