A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: stopping just one sound (loop)

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Posts
    4

    stopping just one sound (loop)

    I've got a looping soundfile which plays throughout the whole animation
    and should stop at a specific frame in the main timeline,
    without stopping the other soundfiles.

    First I exported the soundfile to a symbol called "back_loop", then
    I entered the following in the first frame (main timeline):

    sound = new Sound();
    sound.attachSound("back_loop");
    sound.start( 0, 9999 );


    In the frame, where this loop should stop, I simply entered:

    sound.stop();


    It really stops the "back_loop", but all other sound-effects also stop,
    its the same effect as <stopAllSounds();>


    What am I doing wrong ?

    many thanx
    -=ToReaDoR=-

  2. #2
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    sound = new Sound();

    this is a global sound object and will stop all sounds in the movie.

    instead associate a unique mc with your sound object:

    sound = new Sound(target path to unique mc);

  3. #3
    Junior Member
    Join Date
    Oct 2002
    Posts
    4
    Thanx, but how should I do that exactly ? (Never have done this before)

    - Made a MC (named "loop"), one frame with the soundfile. Right ?
    - First frame of main timeline the following script:

    s = new Sound(loopMC);
    s.start( 0, 99999);

    But nothing happens.... :-(


    Hope, you can give me more detailed descriptions. many thanx
    -=ToReaDoR=-

  4. #4
    Registered User
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    For more information on the sound object read Remixology #1-2.

    target paths are a basic ActionScript concept for more information about this please ask in the ActionScript forum.

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