A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    11
    Hello!
    How do I add the sounds ("applause.mp3") and ("boo.mp3") to the following actions, please?

    if (answer = = ResponseArray[a+4]) {
    message = "Congratulations!";
    // add "applause.mp3"
    score = ++score;
    } else {
    message = "Too bad!";
    // add "boo.mp3"
    }
    a = a+5;
    b = ++b;
    if (b = = 45 {
    gotoAndPlay (5);
    } else {
    gotoAndPlay (3);
    }

    Thanks for your time.
    J Shipton
    Email me the response please:
    jdshipton@rogers.com

  2. #2
    Where have I been ??
    Join Date
    Oct 2001
    Posts
    305

    One option..

    Put the MP3's into a Blank Movie clip, then when you need them just call on the movie clip. I dont deal with sounds, I dont like sounds, so I tend to avoid sounds.

  3. #3
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    You can also do it with actionscript. Select the sounds in the library right click on each of them and select linkage. Select export this symbol and give them names "boo" and "app".

    you can then call the sounds from your script by

    sfx = new Sound();
    sfx.attachSound("app");
    sfx.start(0,1); // to look the sound once use sfx.start(0,20) to loop 20 times etc.

    and for the boo sound effect
    sfx = new Sound();
    sfx.attachSound("boo");
    sfx.start(0,1);

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