My main movie is on level_0 … and i have created a sound movie i am going to use as a background for my whole main movie. I have 2 frames in my main movie as my preloader then on frame 3 i use command loadmovie (url:loop.swf level_1). My problem is that my sound movie is in mp3 format … and its file is bigger than my main movie( main=1 M and sound=4 M ). Trouble is: when my main movie is loaded… my sound isnt loaded yet. I want my main movies play when my sound movie is loaded… can you help me ?
Do you have any suggestion kirupa ?

I realize that the sound is large, but can you explain why you are loading it using the load movie command?

I just want to get the feel for what you’re attempting to accomplish…

I have a couple of scenes and want a background music to play through the whole scenes. I tried to use a stream sound and put it in the first scene, but when it goes to next scene, the music stop. So I use loadmovie command.


Ok… on the sound file, have a stop action in a frame before any sound occurs.

In your main movie, once the preloader is completed, in the next frame have a command which calls out to the movie clip which now contains the sound, and have it play as you start the main time line playing.

I think that could work… if not, or if you don’t understand what I’m saying… write back

Here is a link to what i think you are asking about.
This tutorial will show you how to use a preloader for your attachSound SWF.


I hope this helps


thanks mikey… :slight_smile:

You are welcome…
This tutorial really opened my eyes on actionScripting using FUNCTION…what an awesome little script.

BTW : how do you change your name from “FLASHER” to “opener of ways”?
Just curious…Do you have to have a certain amount of POSTS? or for that matter responses?


There is a section lower on this site where Kirupa takes requests for things like custom names. I think it’s “general”

Thanks guys, :slight_smile: ).
Now I have another question, how to put my sound in my main movie so the sound can play through the whole scenes ? Because I have trouble playing the sound through the entire movies, it plays in one scenes, but when it goes to other scenes, it stopped.
Can you help me please ?

If you want a looping sound through the whole movie you must create a separate SWF just for sound. You can call it soundTrack.swf.
here’s a link


good luck

Here’s another easier answer, though it might require more time now, think about this for future projects. Almost nobody who’s been working with flash for a year, bothers with multiple scenes.
Anything you need to do, can be worked out in a single scene. If you have a dramatic change in animation or a section of your web site, then maybe you could use another scene, but likely your music will change at that point anyway, and would make things more dramatic to the viewer if it did.

I realize that this may not help you, as it may be far too late to rework what you’re doing. But consider also that you’ve done this entire project once, and you’ve got all the elements that you used, stored in a library (that’s what that open as library function is under your file options.) Probebly you could recreate it in a third of the time it took you to build in the first place. That’s taking into consideration having to come here 10 times a day to ask how you can put it all in one scene.
Like I said, just some stuff to think about.