HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... SoundOn Function
SoundOn Function
  View type:
Much of my tutorial uses narration to deliver content via audio. If the user turns the sound off using the audio button on the master page, they miss a ton of my content. I would like to have a dialog box that pops up with the content written as text should they choose to turn the sound off.

I see there is a function called "SoundOn" which returns a 1 if the sound is on or a 0 if the sound is off ... but I can not seem to make it work. Can someone provide an example IF statement which will display a dialogbox if the sound is on?

Thanks!!!
 
Why not use a simpler solution and just add another action to the button that is used to switch the sound off?
An easy way might be to make a text box with your written commentary in it, position and scale it on the page then hide it. Give it a beforedisplay display action and make the object hidden.
When the user clicks the sound off you can use an onclick display action on the same button and there is your text.
The text might be a little cramped or larger than your display area for it so remember to set the text box up so it will scroll, this is quite simple to do in any text object. When you are in Edit click on the HTML mode button (lower icon bar of the text editor, last icon on the right) BEFORE you add any text highlight the text you see and replace it with this:
<div style="width: 100%; height: 300px; overflow-y: scroll">Place your text here</div>
You will need to set the height by hand. For this size the text box on the page so it fits your layout and check it's properties, change the 300 above to the height shown in the properties.
 
 
<div style="width: 100%; height: 200px; overflow-y: scroll">
The code will look like this
" &lt;div style="width: 100%; height: 300px; overflow-y: scroll"&gt;Place your text here&lt;/div&gt; "
Ignore the outer "'s
And your text will scroll nicely like this [:D]
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla tincidunt risus quis augue. Curabitur malesuada, est id malesuada tincidunt, justo quam pulvinar mi, quis tempus arcu dui eget diam. Nulla facilisi. Quisque augue sapien, lacinia suscipit, tincidunt at, aliquam vitae, lorem. Aenean nec nunc. Suspendisse pretium libero non libero. Etiam dapibus. Cras turpis nulla, porta in, egestas eu, tempor ac, ante. Donec a nisl ut dui auctor venenatis. Maecenas elementum purus non diam. Sed a sapien. Quisque in odio. In tempor elementum enim. Phasellus sed orci in libero vehicula vulputate. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Mauris tempus adipiscing odio.

</div>

 
 
 
LOL That was funny... Here is the strand!
<a href="http://www.courselab.com/db/cle/3900BE1CE2C8BDBFC32572EC0070D747/main_id/DEB1AE8A7B1B3576C3256FCF0055974C/extended/1/sid//did//forum.html#3900BE1CE2C8BDBFC32572EC0070D747"> link </a>
 
 
 
 
Issue #2 ... If they turn the sound off on page 3, using your strategy, the text box appears on page 3. However, if they move on to page 4, the sound is still off, but no more 'onclick' events have taken place so the text box on page 4 does not display.

What I am trying to accomplish is for the system to know that the sound is off, so it displays the text box on all pages. Ideally, if the sound gets turned back on, the text would disappear (but that may be wishful thinking).
 
 
 
 
 
Add more on onclick display events to the buttons, one for each page that you need the event to occur on?
You can select slides other than the one being viewed and switch the objects on those pages too.

Oh sorry about the mess above [:o]I didn't expect to get scrolling text fields within scrolling text fields!!
LOL There's got to be a use for that somewhere!!
 
 
 
 
 
 
Else set a separate variable up as a module wide variable, have the sound off button change the variables value.
Then on each subsequent page your hidden text has an attached action like:
ondisplay
IF var_name="trigger variable"
display (unhide the text)

All the objects you want switched on through the module.

Make the soundon button change the variable again and the if statement fails so they are visible again.

That more the thing you were after?
 
 
 
 
Ok, the button is on my template master page. I can add actions to that button, but will they be able to display a different text box on each page?

Assume Text_box_1 is on page 1 ... and Text_box_2 is on page 2. Should I just have it activate all of the boxes on all pages?
Subject:
Message options
No additional options