Muting Flash sound via Lectora button.
January 29, 2008 12:00 AM
Make a new layer in your timeline and in the first frame put this code:var mySound = new Sound();var mute = "false";this.onEnterFrame = function(){if (mute == "false"){mySound.setVolume(100);}else{mySound.setVolume(0);}}[/CODE]This is set up so you will do the toggling from Lectora - sorry if need flash to handle that let me know. Anyhow, in Lectora create two buttons - one for mute and one for unmute. For the mute button you will put the actions:On Click --> Flash Command --> Set Variable --> mute --> truefor the unmute button you would put the same thing only you would set the variable mute to false. You would also need some actions on there to show hide itself and show the other button when it is clicked. Hope this helps. Let me know if you have any problems.-MarkEdited By: Hemingway on 2008-2-4 9:54:0[CODE]var mySound = new Sound();var mute = "false";this.onEnterFrame = function(){if (mute == "false"){mySound.setVolume(100);}else{mySound.setVolume(0);}}[/CODE]This is set up so you will do the toggling from Lectora - sorry if need flash to handle that let me know. Anyhow, in Lectora create two buttons - one for mute and one for unmute. For the mute button you will put the actions:On Click --> Flash Command --> Set Variable --> mute --> truefor the unmute button you would put the same thing only you would set the variable mute to false. You would also need some actions on there to show hide itself and show the other button when it is clicked. Hope this helps. Let me know if you have any problems.-MarkEdited By: Hemingway on 2008-2-4 9:54:0
Discussions have been disabled for this post