Hi,
when have a frame with MovieClip and inside is another MovieClip with a sound (2-frame animation so I can hear it is looping), it will continue looping also on all next frames - the sound is still here.
It also loops if I don't go to this frame and use gotoAndStop to jump directly to any of the following frames.
You can download zipped example here: https://docs.google.com/open?id=0B_aeMwO9RVB2Z3daT2hwR2hvSXM
Please can anyone explain me why does it happen? Is it a bug?
Thanks!
it's not likely anyone will download and work on your files and it's not likely you've encountered a flash bug.
there are so many ways to cause the problem you describe (a sound playing when you think it should not), you can't be helped without some specifics of your situation. to start, as2 or as3? sound attached to a timeline or instantiated with code?
why do you think your sound should not continue to play if it is attached to a looping timeline?
Hi kglad!
It's AS3. I use the most basic document class in the example with simple gotoAndStop.
In the FLA I have one layer with two keyframes - in the first one there is a MoviClip that contains another MC that contains 2-frame anim with sound. The second keyframe is blank, only txt to see I am on this frame.
The problem is that when I gotoAndStop to any frame that lies after the keyframe with Movieclip (that contains anim with sound) I can hear this sound even I have never been on this frame.
For me it looks like nested MovieClips from previous frames are playing in the background when we are on any next keyframe - which is very strange for me.
It is even more strange because if I put the anim directly to the top-level MC (MC -> 2frameAnim) the anim does not play. Only when it is nested to another MC (MC -> MC -> 2frameAnim).
I can easily work around this by using SWC or so to jump between scenes different way instead of using named frames but I like the simplicity of this approach and would like to understand this situation.
Thank you!
It's AS3. I use the most basic document class in the example with simple gotoAndStop.
In the FLA I have one layer with two keyframes - in the first one there is a MoviClip that contains another MC that contains 2-frame anim with sound. The second keyframe is blank, only txt to see I am on this frame.
what second keyrame? the 2nd main timeline keyframe or MC's 2nd frame?
The problem is that when I gotoAndStop to any frame that lies after the keyframe with Movieclip (that contains anim with sound) I can hear this sound even I have never been on this frame.
what makes you think you never play the frame with the sound? have you attached a trace() to that frame?
OK, I have posted this issue on another website with little different explanation, so I copy it here, maybe you understand my issue now.
Hi,
I have 2 keyframes on Timeline - in the first there is a MC with another MC inside that contains animation with sound. The second keyframe (on main Timeline) is simple txt to know I am on this frame.
The problem is that if I jump via gotoAndStop() to the second keyframe, I can hear the sound of MovieClip's anim that is in the first keyframe - anim is playing even it's parent MC is not on actual keyframe!
Anyone can explain me why does this happen?
If I put animation directly to MC (not inside another nested MC), the anim does not play. Also when using:
gotoAndStop('firstKeyFrame');
gotoAndStop('secondKeyFrame');
then anim also does not play. BUT! If I add trace() to anim it suddenly starts to play again.
It's really weird for me and looks like a bug.
Thanks for help!
Click in the frame that has audio. Open the properties panel and check the Sync drop-down. It is set to Event by default. Change it to stream. Now make sure the frame that has the audio has enough frames to play the full audio.
By using Sync:Event you are asking flash to play the audio in the frame regardless if it's in that frame or not. Stream only plays if the playhead is currently playing that clip. The second the playhead is outside the clip, when set to stream, it will stop playing.
So in your screenshot, after you set Sync:Stream you will need to add frames (F5) to the layer that contains the audio (you can see the waveform). If you don't you'll only hear however many frames of audio you extend.
Hi,
thanks, but I want to understand why the anim plays in the background while I am on the different keyframe.
Also - isn't it weird that when I put the anim one level up (directly to MC that is on main timeline), it does not play (and no sound of course)?
I really don't understand the logic how this things work.
Thanks
Somewhat strange behavior but you should put a stop() on the first frame of the clip that contains the audio. Otherwise it's going to bounce back and forth between frame 1 and 2 unless you explicitly tell it to stop elsewhere.
You're jumping to frame 10 so that should put you past the clip and you're telling it to stop on 10 so it should never load that clip, animation or sound. Best thing to do is add a new layer in there and add some trace statements so you can see if something else is affecting the clip that you might not be thinking of.
On frame 1 I'd do:
trace("Frame 1");
On frame 10 I'd do:
trace("Frame 10");
On frame 4 where that clip starts I'd put:
trace("Frame 4");
Chances are you'll see the traces happen even though you don't expect it. Something you're not thinking of is probably affecting that timeline.
Hi, I finally found what is this problem about - it is already reported several years old bug - quite weird Adobe haven't fixed it yet.
https://bugbase.adobe.com/index.cfm?event=bug&id=3059118
The example on that page is exactly the same I have posted here.
Thanks to anyone for trying to help me!
North America
Europe, Middle East and Africa
Asia Pacific