dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: An easier way ?!?

  1. #1
    Member
    Join Date
    May 2004
    Posts
    94

    An easier way ?!?

    IS THERE AN EASIER WAY OF DOING THIS OR COULD YOU DECIPHER THIS INTO SIMPLE NEWBIE LANGUAGE.


    FAQ #13: How can I make a toggle mute button that mutes all sound in the movie?
    A: use a global sound object to control volume, pan and stop of all sounds currently loaded in the player including other SWF. create a simple mc with 2 frames, one labled "unmute" with a umute graphic and stop() action, the second labled "mute" with a mute graphic and stop() action. Include a button in another layer of this mc.

    // on main timeline
    globalvolume = new Sound(); // no associated movie clip.

    //button to mute sound and change toggle mc frames
    on(release){
    if(_root.globalvolume.getVolume() > 0){
    _root.globalvolume.setVolume(0); // mutes all sound
    play(); //switch to mute frame
    } else {
    _root.globalvolume.setVolume(100); // unmutes all sound
    play(); //switch to unmute frame
    }
    }

  2. #2
    Member
    Join Date
    May 2004
    Posts
    94
    sorry peeps i was beingstupid have read again and had a go and eventually got it sorted in my vacant space of a mind

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center