Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 2 of 2
  1. #1

    Default How to create looped sound clip with play/stop buttons?

    Hi everyone, basically, What I want to happen is when the flash file loads up on my page a small soundclip (.wav) starts playing, and it has to be looped so it plays exactly continuously and seamlessly; there can't be a 'gap' when it reaches the end and starts playing again.

    I'd like to offer two controls: a stop button so people can stop it, and a play button so they can start it up again if they wish.

    If that's too complicated then just the stop button would do.

    When I've tried to do this myself the sound loads up again after the stop button has been pressed and the play button didn't work.

    Im quite new to flash so a step by step guide would be of great help.

    Thank you very much for your time and help.

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    .wav files are usually imported into flash and placed on a timeline. The timeline will automatically loop unless told not to. Create a movieclip and give it an instance name of "mySound". Import your wav file onto that timeline. On the main timeline, create two buttons. Give them instance names of "myStart" and "myStop". Paste this code onto the first frame of the main timeline......
    Code:
    myStart.onRelease=function(){
    mySound.play();
    }
    myStop.onRelease=function(){
    mySound.stop();
    }
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. BG sound playing non-stop through scenes
    By colormesilly in forum Sound and Music
    Replies: 0
    Last Post: 09-17-2006, 03:34 AM
  2. Sound - play and stop buttons
    By Floyd89 in forum Newbies
    Replies: 1
    Last Post: 12-16-2005, 11:47 PM
  3. Replies: 3
    Last Post: 06-03-2005, 12:00 PM
  4. How do I stop sound?
    By KingKong in forum Flash Scripting
    Replies: 3
    Last Post: 09-29-2004, 09:32 PM
  5. One Button - Two Functions - Stop and Play
    By jbrowning in forum Flash Scripting
    Replies: 1
    Last Post: 09-07-2004, 07:22 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial