your sound probably is set to stream. assign it to an event sound if you don't want it to play if the starting frame is skipped.
No, it's set to Event. The only way I can get it to work is to set it to Stop. Or... shift frame 1, 2 and 3 one frame to the right. The first frame now being empty, frame 2 now containing gotoAndPlay(4), frame 3 the sound bit, frame 4 the main movie. Then the sound IS being skipped. Like it should.
So I'm curious, why doesn't it work when all of this starts from frame 1 (sound is playing when it should be skipped), but it does work (sound being sipped) when these frame start anywhere BUT frame 1?
if the sound is an event sound it will only play if you're playing the frame where your sound starts or, you're doing something else to start your sound (like not waiting until frame 3 has loaded to execute that goto).
If you download my attached file from post #1 you can see that I haven't done anything that would make that sound play.
Frame 1 has gotoAndPlay(3), frame 2 is a frame with the library's sound dragged on stage, frame 3 has only three commented lines, all other are empty. Yet the sound from frame 2 is playing even if it is skipped by frame 1.
Can you check out the file?
as mentioned above, you're not waiting until frame 3 has loaded to execute that goto.
I'm sorry, but I don't quite understand what you mean. When I start the swf, on frame 1 it says gotoAndPlay(3). If I understand you correctly flash would first go through all available frames (loading them in memory) and after all frames/bytes have loaded begin from frame 1? That doesn't make sense to me. That would mean flash would first show all images, execute all commands if finds in every frame while loading each frame, before (after all frames have been loaded), starting from frame 1 and execute all commands properly. But perhaps you mean something else?
A simple test would be in frame 1:
Still the sound in frame 2 is playing even though I'm waiting with the stop-command.
And when I shift frame 1-2-3 to 2-3-4 it does work (sound is skipped). So it has something to do with how flash handles frame 1 I think?
flash displays and executes the code in frame 1 as soon as the assets needed in frame 1 are loaded. that can be (and is, in your file) BEFORE the assets needed by frame 3 are loaded.
so, flash cannot go to and play frame 3 when your code in frame 1 executes. therefore, your swf will be played just as if that code didn't exist (except code in frame 2 won't execute).