flash cs3 playlist

Posted on 2008-11-05
Last Modified: 2013-11-12
How to build a play list on flash cs3 using the list as toggle buttons?
Hi, I need  to crate a flash file that will served as a soundtrack.
I have a list of 9 titled songs converted each one into buttons. All I want is to make each button play the sample audio belonging to the song title. I manage to make it play but I have more than one so my problem is that I need for each button to turn off the previous first and then play the new audio in case user switches to next song before the first one ends.

This is my code sample for just 2 buttons so far:
mySound = new Sound();

song1_btn.onRelease = function() {


mySound = new Sound();

song2_btn.onRelease = function() {
Question by:Mlo-Designs
    LVL 39

    Accepted Solution

    this should work

    function playSound(which:String) {
    var mySound:Sound = new Sound();
    btn1.onRelease =function() {
    btn2.onRelease = function() {

    Open in new window


    Author Closing Comment

    OMG- Worked like a charm. Thank You Very Much

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
    There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
    The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Click on Too…
    The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now