global volume control

katherine Community Member Posts: 53
I am actually encountering this exact same problem. I am using Lectora 2008 and Flash CS3 (but ActionScript 2.0 due to player version targeted being 7).I have an audio control in Lectora that needs to remain consistent from page to page, this much I have working (I'll explain how shortly). I have a variable in my Flash movie called AudioPlaying. This either has a value of true or false, depending on the status of the audio. I have an interval in Flash that constantly checks the value of this variable and sets the audio volume based on it. If I place a button in my Flash movie that changes the value of AudioPlaying when clicked, everything works fine. The code looks like this:var AudioPlaying:Boolean = true;function soundListener():Void {     if (AudioPlaying == true) {            narration.setVolume(100);     } else if (AudioPlaying == false) {            narration.setVolume(0);     }}var intervalID:Number = setInterval(soundListener, 50);var narration:Sound = new Sound();However, where I seem to be messing something up is in having Lectora change the value of this variable inside of Flash.Right now, I have two buttons in Lectora for audio, only one of which is initially visible. The first button is the button which turns the audio off. Directly over-top, but initially invisible is a button that turns the audio on. I have created a variable in Lectora called AudioOn with an initial value of true. I have selected to retain the value of this variable between sessions as well so that a user who does not want sound will not return to sound upon reloading (I'm assuming this is how to affect that).I have an action group that executes on Show for the page that sets the visibility of the audio button and passes a value for AudioPlaying to Flash depending on the value of AudioOn inside of Lectora.This is working in so far as, if the user has turned audio off on the previous screen, the audio on button shows upon entering the new page (this button is normally invisible).I have a similar set of actions that run for each of the audio buttons. The only difference here is that there is an additional action that modifies the value of AudioOn in Lectora depending on which selection has been made.Everything contained inside of Lectora seems to be working fine (i.e. buttons swap appropriately when selected, buttons maintain state between screens) However, there's apparently a breakdown when I attempt to communicate with Flash, as the code that works inside of Flash with a button inside of Flash no longer works once this action is controlling it:Action Name: AudioOn (not to be confused with the variable of the same name... should I change that?)Action: Flash CommandTarget: IM1020_1_5 (this is the name of the SWF)Command: Set VariableName: AudioPlayingValue: TrueI've also added the following condition (this might not be necessary) to try and avoid any odd behavior:Variable: AudioOnRelationship: Equal ToValue: TrueSo, like I said, I am expecting the above action to change the value of AudioPlaying in the Flash to True (or False, depending on the button pushed which execute different versions of the same action) when the value of AudioOn is, in this case, true. Is this set up correctly? Am I missing something? Why isn't this working?I've gone through a lot of description here, and I may be leaving something out. Let me know if there are any more questions that I haven't covered.Thanks!Jeremy