A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: create multiple sound buttons

  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    1

    create multiple sound buttons

    Hi,

    I am using actionscript 2.0 and I am trying to create multiple sound buttons that trigger multiple different .mp3 files via mouse click. I have gotten it to work with one sound file using this actionscript

    my_sound = new Sound();
    my_sound.attachSound("Drum Beat 1_bip.mp3");
    play();

    but as soon as I add another button and try to link it to another file it does not work. I would like to make it so that even if I click another button to start another sound, the first sound keeps playing. How would I do this. Also I am very new to Flash so the more details the better. I need an answer ASAP as I have to complete this tonight. Thank you very much in advance.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    my_sound = new Sound(this);

    Use the parameter to attach to a specific timeline. in the example i used this (the current timeline).

    Check www.kennybellew.com/tutorial for more indepth of the sound object.

    gparis

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