9/2/2011 9:31:27 PM
Title:
How can I stop sound on first frame?
I have a movie clip. Within this, there are three movie clips (A, B, C) on three consecutive frames, each movie clip contains their own sound on timeline and animations. Each of the tree movie clip has next and back buttons. The problem is when I click on back button on third movie (C), last movie clip, to go back to second movie clip (B), not only the sound and animation of second movie clip BUT ALSO THE SOUND OF FIRST MOVIE CLIP plays. How can I stop the sound on first frame movie clip (A) from playing?
next_mc.addEventListener(MouseEvent.CLICK, goToNext);
function goToNext(event:MouseEvent):void{
SoundMixer.stopAll();
MovieClip(parent).nextFrame();
}
back_mc.addEventListener(MouseEvent.CLICK, goToBack);
function goToBack(event:MouseEvent):void{
SoundMixer.stopAll();
MovieClip(parent).prevFrame();
Shawn
Points: 680
Posts:0
9/9/2011 3:51:15 AM
check this similar thread
http://askmeflash.com/qdetail/578/control-global-volume-of-a-loaded-sound
9/14/2011 12:57:54 AM
try this ones.
When u click on next or back or when u change the clip just stop animation or movie not sound then reset sound for next clip.
9/16/2011 7:26:58 PM
First of all I want to thank both of you, Shawn and Gourav_flex. Shawan, I went through the link and I added code (something like) in both next and back buttons. The result was that sound got muted and when I increased volume. Both sounds played, i.e., when I click on back button on third frame movieclip to back to second frame movieclip, the animation and sound of second frame played ALONG WITH SOUND PLACED ON FIRST FRAME MC. Is there any way I can upload fla and you can see it for yourself?
var mySoundTrans:SoundTransform = new SoundTransform(0, 0);
SoundMixer.soundTransform = mySoundTrans;
9/16/2011 7:30:21 PM
Thanks Gourav_flex, can you explain what you meant by reseting sound. I mean you are suggesting the above SoundTransform method or something else. If you could give me some example that would be nice. Is there any way I can send fla so that you can see it?
Shawn
Points: 680
Posts:0
9/16/2011 9:16:21 PM
use some file sharing website or your server to upload your file and share the link here so we can see whats exactly happening.
9/16/2011 10:16:49 PM
yes send me ur files so that we can understand batter
9/17/2011 6:11:53 AM
I have uploaded the file. You can download it. Please excuse me if you find non-professional things in my file because I am an ameature. No formal course, I learned flash through online tutorials and forums like askMeFlash, but I would be very glad if you could point out my mistakes so that I can improve and do it the way professionals do. These are the links: http://www.mediafire.com/?cqzd547zccndpwt and http://www.mediafire.com/file/cqzd547zccndpwt/part8Test.fla. Thanks.
9/19/2011 9:57:19 PM
your file seems to be working fine now? I did not find any sound overlapping.
9/22/2011 5:11:53 AM
Thanks but extremely sorry, I inadverdently deleted it. If you could please upload it again at same link I would be extremely greatful to you. Thanks
9/22/2011 5:49:26 AM
Thanks Supreme but I am anxiously waiting for your reply. I feel so low. I feel like kicking myself. I tried everything I knew but nothing worked and finally when I had the solution, finally when you solved it for me, I unintentionally deleted it. I am very keen to know how you solved, what was it that I missed. Supreme, I request you to upload it one last time, thanks.
9/23/2011 9:49:44 AM
I mean to say that I downloaded your file and checked it , but could not found any sound overlapping problem . If you can re-upload it and tell me the steps to create the issue I will look into it and will fix it hopefully :).
Write the steps which I should follow to see the sound problem. Like which button to click after which button.
9/23/2011 8:21:25 PM
ok, I will tell you. Open my fla, control+enter, click next button 3 times and then click on back button. Now you will hear sound and animations of second frame as well as sound that is on first frame(i.e.,overlapping sound). Ideally, I would like that when I click back button only sound and animations of second frame plays.
9/23/2011 9:40:59 PM
I have lost file, upload it again