Muting Flash sound via Lectora button.

I haven't tested this but it should only trigger once when mute is changed to true or false:

Code:

var narrSound:Sound = new Sound(); narrSound.attachSound("sndSound"); narrSound.start(); var sndDuration:Number; var mute = "false"; var check = "false";narrSound.start(); this.onEnterFrame = function() { if(mute != check){ if (mute == "false") { narrSound.setVolume(100); narrSound.start(sndDuration); check = "false"; } else { narrSound.setVolume(0); sndDuration = narrSound.position/1000; narrSound.stop(); check = "true"; } }}

Discussions have been disabled for this post