A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Script to control sounds?

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    119

    Script to control sounds?

    Hey i was looking into if there is anyway to work with sounds using actionscript?

    Basically im looking for something that

    * Plays a sound in the library on loop
    * stops that sound
    * mute that sound (so it's still playing but cant be heard)
    * unmutes that sound

    the idea is so i can spread out this in scripts instead of in the frames.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Actionscript Code:
    mySound = new Sound(); // new Sound Object
    mySound.attahcMovie("linkage_ID"); // attach the library sound by Linkage ID
    mySound.stop(); // stop the sound
    mySound.setVolume(0); // set volume to zero, or mute it
    mySound.setVolume(100); // set volume to hundred, or unmute it
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

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