turn sound volume on and off with one button

Posted on 2009-04-16
Last Modified: 2013-11-12
i would like to create one button that users can click to TURN VOLUME to ZERO and then click again to TURN VOLUME BACK UP to Full.

currently all sounds have been embedded in the library and played as seperate events on 2 layers of the timeline. They are started and stopped according to whats happening on the timeline.

also if possible I want the button to change according to whether or not the volume is up or down.

So say the music is playing and i click the 'volume on/off' button, the volume turns down, i would like the button to do a little shake animation, up and down and then change so that it enlarges in size.

Then i click it again and the volume turns back up, and the button does a little shake animation and decreases to its original size.

thanks for your help..

Question by:simophat
    LVL 18

    Expert Comment

    Here's a free one you can download, dissect and customize:

    Author Comment

    That script was action script 1. My flash application is actionscript 2 . is it possible to use action script 1 with actionscript 2 flash fileS?

    LVL 18

    Accepted Solution

    I'm sorry Simon, your reply got lost in the shuffle of my EE folder.  Were you able to get this working?

    Though the download page for this sample button says AS1, the file actually appears to be in AS2.  I was able to publish in AS2 with no error alerts.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
    Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
    The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
    The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Click on Too…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now