Help controlling movie with preloader


I’m having difficulty controlling a movie with a mc containing a preloader. I would appreciate it if some1 could help me.

i’m using this to create a function and define my sound:

[COLOR=green]function mysound(){
//create a new sound object on this timeline
mysoundobj=new Sound(this)

//attach the sound from the library

//play the sound and loop 999 times
} [/COLOR]

I’m then exporting this as sound.swf

Then in my main movie on frame 1 i have a play button, and a stop() in my actions layer. My play button has the actions:

[COLOR=green]on (press) {
} [/COLOR]

In frame 5 i have a stop button and a movie clip with this code loading my preloader and playing my sound.swf:

//load the sound movie

//create a percentage

//remove this if you dont want to display a percentage
percentdisplay=percentloaded + “%”

//if the movie is fully loaded
if(percentloaded == 100 && !initialize){

//call the function that creates out new sound and plays it

//dont call call the function again

//hide this movieclip
} [/COLOR]

On my stop button i have:

[COLOR=green]on (press) {
} [/COLOR]

And finally i have another instance of the play button on frame 10 with the actions:

[COLOR=green]on (press) {
if(playing!=true) {
} [/COLOR]

Now this works fine you can c it here

i have nine buttons that i am going to use(only track01 works at the moment), so i want to change it so that when i press my stop button the movie goes to frame 1. Then my play button, when pressed, checks to see if the preloader has loaded and if so jump to frame 10.

I’ve been trying hard to do this but i would appreciate a little help.

I can upload the .fla’s if that will help