Skip to main content
Arioman
Inspiring
March 5, 2013
Answered

Stop Sound On Specific Frame and Play ( Resume ) after Exit

  • March 5, 2013
  • 1 reply
  • 537 views

hi , i have Flash Project

i made a ON/OFF button for background music sound and use these script :

var my_sound:SoundId = new SoundId();

var my_channel:SoundChannel = new SoundChannel();

my_channel = my_sound.play();

my_channel.addEventListener(Event.SOUND_COMPLETE,introloop);

function introloop(e:Event):void {

   

    my_channel = my_sound.play(0, 9999);

}

stop_btn.addEventListener(MouseEvent.CLICK, stopSound);

function stopSound(event:MouseEvent):void{

my_channel.stop();

gotoAndStop (2);

}

now i have Frame that i have Flv component ( mp4 Clip ) on it and i have Button on my first frame to go to this Frame , i want to when i Go to Flv frame the  background sound fade out or off and when i exit this frame the background sound again fade in or ON ( better Resume my Sound )

any idea how to do that ??!   specially for play sound again After Exit Flv frame ?!?

thanks ...

This topic has been closed for replies.
Correct answer Ned Murphy

Just use the same play and stop commands in whatever functions get used for exiting and entering the flv frame.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
March 5, 2013

Just use the same play and stop commands in whatever functions get used for exiting and entering the flv frame.