g
Printer Friendly Version

editor  
BellaOnline's Digital Art and Design Editor
 

Toggle Background Music in Kwik 2

In this tutorial, we will continue to work on the toggle button for the background music. When we created buttons in past tutorials, we first created the button layer and then "attached" actions to that button layer. For example, the Next button has a Go To Next Page action attached to it.

This time we will create the two actions for controlling the audio before we attach those actions to the button. Why? Because we are going to attach two actions to one button. Then we will tell the button to remember which action it performed last and when clicked again to perform the other action. This works like a light switch. If the light is off, you use the switch to turn the light on. If the light is on, you use the same switch to turn off the light. This is commonly called a toggle button.

Before we can set the toggle button, we need to create the two actions that will control the music.

Note: We have already set the audio to start playing when the app opens to the cover page.

Pause the audio
Resume the audio

  1. Select the Project and Pages icon in the Categories bar.

  2. Click the Actions tool in the Toolset (third tool in second row)

  3. In the Add Actions dialog box, rename the action to "musicBgOFF".

    Notice that the Default and Over button state controls are grayed out. This is because we are not yet attaching the action to any layer.

  4. In the Interactions panel, open the Audio list and choose Pause Audio.

  5. Choose the musicBg audio file from the pop-up box.

  6. Click Create.

Repeat the steps above for the Resume Audio action.

  1. Name the action "musicBgON".

  2. From the Audio list, choose Resume Audio and select the same musicBg audio file as before.

Now we are ready to set up the toggle button.

  1. Select the musicbtn layer.

  2. Select the Interactions icon in the Categories bar.

  3. Click the Add Button tool in the Toolset to open the Add Button dialog box.

  4. Rename the button to "musicBgTog".

  5. The Default and Over button states will be the musicbtn layer.

  6. In the Interactions panel, open the Common list.

  7. Choose the Play Random action to open the Suffle dialog box.

  8. Click the Plus button to open the list of actions.

  9. Select the musicBgOFF action.

  10. Click the Plus button again and choose the musicBgON action.

  11. Click Create to close the dialog box.

    You will notice that the two actions are added to the Actions panel in the Add Button dialog box.

  12. Click Create to finish the button.

Before we move on to another page, let's set up the Info button on the Cover page to take the reader to the information page, which is page29.

  1. Select the infobtn layer.

  2. Click the Interactions icon in the Categories bar.

  3. Click the Add Button button from the Toolset.

  4. In the Add Action dialog box, name the button "info_pg".

  5. We want to use the infobtn layer for both the Default and Save button states.

  6. In the Interactions section, expand the Common list.

  7. Select the Go To Page option and choose page29 from the drop-down list.

  8. Click Create.

Click File - Save to save the changes to the cover psd file.

Select the Export Current Page Only icon and click Publish to preview the animation.

Go to your LearnKwik folder and make a backup copy of the Template project folder. Rename the backup folder by adding the current date to the end. (TemplateMM-DD-YY).

← Back

These tutorials are for the older version of Kwik 2 and may not be much help when using Kwik 3 and above. If you are having trouble, please use the Kwik forum

Kwik product, the Kwik logo and Kwiksher are properties of Kwiksher.com - Copyright 2011. Screen shots used by permission.
Copyright 2018 Adobe Systems Incorporated. All rights reserved. Adobe product screen shot(s) reprinted with permission from Adobe Systems Incorporated. Adobe, Photoshop, Photoshop Album, Photoshop Elements, Illustrator, InDesign, GoLive, Acrobat, Cue, Premiere Pro, Premiere Elements, Bridge, After Effects, InCopy, Dreamweaver, Flash, ActionScript, Fireworks, Contribute, Captivate, Flash Catalyst and Flash Paper is/are either [a] registered trademark[s] or a trademark[s] of Adobe Systems Incorporated in the United States and/or other countries.

Digital Art and Design Site @ BellaOnline
View This Article in Regular Layout

Content copyright © 2013 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.



| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2023 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor