A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Help!! How Do I Do This?

  1. #1
    if(i>$){i=:);} falshdancer's Avatar
    Join Date
    Nov 2003
    Location
    NYC
    Posts
    546

    Help!! How Do I Do This?

    The stopallSounds action script mutes all sounds and I only want to stop one. Basically I want to control the stopping of a sound effect without stopping the background music loop. Can anyone help?
    la la la la laaaaaaa

  2. #2
    Senior Member frostbite's Avatar
    Join Date
    Aug 2003
    Location
    Colorado
    Posts
    666
    Dilema = new Sound(this);
    Dilema.attachSound("Dilema");
    Dilema.start(0, 9999);
    Dilema.setVolume(2);

    volume is 1 to 100

    the 0, 9999 makes it loop

    then to stop it use

    Dilema.stop();

    that help?
    Yarrg Matey!

  3. #3
    if(i>$){i=:);} falshdancer's Avatar
    Join Date
    Nov 2003
    Location
    NYC
    Posts
    546
    is Dilema the name of an audio clip?

    I tried it and it didn't work? What am I doig wrong? I put it in a frame action and the sound doesen't start? Am I suppose to select the audio track in the properties pallett anlong with the attachSound?

    Thanks
    Last edited by falshdancer; 04-06-2004 at 08:10 PM.
    la la la la laaaaaaa

  4. #4
    Senior Member frostbite's Avatar
    Join Date
    Aug 2003
    Location
    Colorado
    Posts
    666
    what you have to do, go to your library and right click on the song

    then select linkage

    and click export to actionscript, then name it watever (Dilema)

    then you dont add it into the frame, it loads it from the library
    Yarrg Matey!

  5. #5
    Senior Member frostbite's Avatar
    Join Date
    Aug 2003
    Location
    Colorado
    Posts
    666
    oops, double post =/

    do u understand?
    Yarrg Matey!

  6. #6
    if(i>$){i=:);} falshdancer's Avatar
    Join Date
    Nov 2003
    Location
    NYC
    Posts
    546
    Sweet, Now it works. Thanks soooo much man!
    la la la la laaaaaaa

  7. #7
    Senior Member frostbite's Avatar
    Join Date
    Aug 2003
    Location
    Colorado
    Posts
    666
    no problem =D
    Yarrg Matey!

  8. #8
    Junior Member
    Join Date
    Mar 2004
    Location
    Ontario, Canada
    Posts
    12
    What if, in my case, I want to maintain the background music to a volume of 20 and when I click a button, the volume of a sound effect is 100? What ends up happening is that my background music increases its volume to 100 along with the sound effect.

    (Starts on the root movie clip)
    music = new Sound(music); //bkgd. music.
    music.attachSound("music");
    music.start(0, 9999);
    music.setVolume(20);

    (Now, the actionscript in a button)
    on (release) { //sound effect.
    mySound = new Sound(mySound);
    mySound.attachSound("mySound");
    mySound.start();
    mySound.setVolume(100);

    }

    You think after specifying the target, the code would make sense.
    c Julie a

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