A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: how to have several full length audio selections?

  1. #1
    Senior Member
    Join Date
    Mar 2001
    ok so they have to be on another .fla entirely and each is called by loadMovie comand.

    but theres a lot more to it than that.

    i need a tutorial about it


  2. #2
    No, gogon, it really is that easy!

    An easy way to make the audio track:
    Make a new, one frame movie.
    Import the audio file, and set the sound in that one frame to be that audio file.
    Export the movie as a .swf, adjusting your sound settings to whatever you want them to be in the publish settings.

    Put that .swf in the same root folder as the movie calling it to make things easier.
    Use the loadMovie command to load "audiotrack.swf" or whatever you're naming it into an empty movie clip in the movie calling the audio track.

    Example script:
    loadMovie ("soundloop.swf", _level0.sounds);

    where "soundloop.swf" was my audio track, and _level0.sounds was the empty movie clip with instance name "sounds" that I loaded the soundloop into. Note there's no quotes around _level0.sounds, because I'm targetting a movie clip.

    If you want several audio tracks to choose from, create buttons that load different .swfs into that same empty clip when pressed. When you load a new one, it automatically takes the place of what was in there previously.

    That's all there is to it.

    Hope that helps.


    [Edited by parenthetikl on 05-30-2001 at 02:43 PM]

  3. #3
    Senior Member
    Join Date
    Mar 2001


    This sounds good!
    I might have it done by tonight...

    One thing more if you dont mind.

    How do I set up a empty movieclip on my main timeline?

    I'm guessing that i create a movieclip in the main movie
    - call it 'music' - go back to main timeline and place an instance of the empty movieclip, called 'music' on the movie somewhere, anywhere. Click on it and go give it an instance name of 'sounds'.

    Isnt my main timeline _level0?
    So in your above example I would really target _level1 or _level0?

    When my viewers go from scene to scene will the soundtrack continue? Thanks Thanks Thanks!
    [Edited by gogon on 05-30-2001 at 03:18 PM]

  4. #4
    Senior Member
    Join Date
    Mar 2001

    last thing...promise

    For the music 'mute' button i would not use stopallsounds because then i would have no button sounds so.....

    Some mp3s i got yesterday seem fairly large, do you happen to know what size i shold try to keep them down to? average size?

    I can do this!
    The locamotive continues to roll...

  5. #5
    Look around on this site and learn how to call movie clips in Flash 5 using dot notation, Here's a quick summary:

    _level0 or _root is your base movie.

    You call any other movie clip referencing it from there up, without having to keep track of what's on what level.

    So in my example, "sounds" is just a movie clip in the main movie with instance name sounds: _level0.sounds. If I had anotherclip inside of sounds, I'd reference it with _level0.sounds.anotherclip.

    When the user jumps to a new scene, think about what happens: there's a new timeleine, so you'll have to reload the clip, which you can do, but it will start from the beginning.

    I'd avoid using scenes if at all possible.

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