PDA

View Full Version : movie load problems


grasshopper
07-22-2005, 03:31 PM
:(
I was wondering if anyone could help me out.
I have a project I am working on, and I am not very good at action script.

What I want is to load a movie that has a looping sound, and a button
that when pressed, fades out the sound.

The problem is when I load the movie, code as follows using a
movie clip named music.

loadMovie("musicmain.swf",music);


The movie comes in but the sound does not work.

The code in the loaded movie is

mySound = new Sound();
mySound.attachSound("mymusicclip");
_root.mySound.start(0, 999);
_root.playing = true;
stop();


If I load a movie that has the same music file just streaming
it is OK,a but I want to uses action script to fade out the
sound when the button is pushed.

Can anyone tell me what I am doing wrong?

Bring the movie into a new level? tried

Initialize move somehow??

Thanks
Grasshopper

ds.pixeled
07-22-2005, 05:49 PM
the problem, first off is your attach sound script. have you ever heard of pathing? you should read up on it. basically your script should be this:
mySound = new Sound();
mySound.attachSound("mymusicclip");
this.mySound.start(0, 999);
this.playing = true;
stop();
put that wherever you wand the sound to be and it should do the job.