A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How Would One Stop Only ONE BUTTONS Sound and not "StopAllSounds"

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Location
    a
    Posts
    16

    How Would One Stop Only ONE BUTTONS Sound and not "StopAllSounds"

    anyone know how to do this? if you could write the actual actionscript out for me that would be awesome. Been having a lot of trouble lately

    I tried

    on (release) {
    sound1.stop();
    }


    I am such a newb so I don't know whats wrong
    Last edited by gabemarchionda; 07-11-2011 at 07:00 PM.
    gabem

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    That code is indeed correct. You just need to make a sound object first on the button that plays the sound:

    on(release){
    sound1 = new Sound();
    sound1.attachSound("sound");
    sound1.start();
    }

    then you simply use the above code on another button to stop that particular sound object

    And btw, I am actually right now, trying to write a script which will do what you wanted in your previous topic, so stay tuned :P
    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