A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Sound problem

  1. #1
    Junior Member
    Join Date
    Jul 2003
    Location
    Denmark
    Posts
    8

    Sound problem

    i cant make the music stop when i press the button which got this script added it starts playing it from starty agains o i got the song running 2 times at different timings!!! help please

    onSelfEvent (release) {
    stopSound("16-neva_too_famous.mp3");
    }

  2. #2
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    Upload the .swi so we can take a look. It seems there may be another PlaySound action in there somewhere.
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  3. #3
    Junior Member
    Join Date
    Jul 2003
    Location
    Denmark
    Posts
    8
    i got it starting to play sound tottaly in the beginnig of the file as want it in the background but i also made the button so if ppl dont wanna listen they can turn it off i got it said to play a sound in the beginning

  4. #4
    The village idiot
    Join Date
    Jan 2003
    Location
    UK!!
    Posts
    81
    Hmm? I never had problems with this...Somebody help? I don't understand what's happening, but personally (v2) I just use on.Release > stop.sound"whatever.snd" (and set it to the right values) then it works, somebody help! I don't want this problem ever!
    Everything I say is the truth.
    The above statement is a lie.

  5. #5
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    If the original action is called from a loop then
    each time the loop recurs the sound will start again.

    example
    Code:
    onFrame (1) {
        playSound("n.wav");
    }
    onFrame (2) {
        gotoSceneAndPlay("<current scene>",1);
    }
    After your stop sound is initiated
    the movie recieves a new instruction to play the sound.
    because the movie is looped.

    One way to insure that the action to call the sound
    is not re-initiated is to place a stop in either your movie
    or set the loop after the initial play sound frame action.

    Code:
    onFrame (1) {
        playSound("n.wav");
    }
    onFrame (3) {
        gotoSceneAndPlay("<current scene>",2);
    }
    If you want to set your sound to loop then do so via the
    sound effects window setting the amount of loops.

    Frets

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