PDA

View Full Version : load movie problem please help


leky
11-21-2001, 02:07 PM
Hi...Guys

I have a problem with my load movie action...Let's me says
I used Loadmovie target to load the second swf file into my main swf file....and it's worked.

loadMovie ("story.swf", "main2");

BUT....something went wrong with my second swf that I loaded.
I couldn't see my background (actually black)
I could see the everything outside work area (actually size is 400x400 and the main movie is 600x600)

Please explain how to fix these problems...
or give me some alternative ways...

Cheers

Leky

Sorry about my English

20 Ton Squirrel
11-21-2001, 05:30 PM
The background color of the loaded SWF isn't brought in... if you want something like that I would suggest that you make a rectangle on the bottom layer of your movie. Color it how you want it and there ya go!

As for the boundaries of the work area... hrmmm... you could use a mask? Make all objects outside range !_visible?

leky
11-22-2001, 03:17 AM
20 Ton Squirrel

Thanks a lot, problem fixed

BUT............ new problem came up

My sound in second movie couldn't work.
Is there any ways to control the sound in main movie to stop after
the second movie shows up and play the sound in second movie instead? because my second movie is the animation story so sound is really important.

Thanks in advance

Cheers

Leky

20 Ton Squirrel
11-23-2001, 09:45 PM
I'm not the authority on sound, but I do know of a couple functions that can help you out. Check out stopAllSounds() in your documentation.

What you can do is use stopAllSounds() in a preloader for your movie. Your code would look something like this...


FRAME 1
tot = targMC.getBytesTotal();

FRAME 2
cur = targMC.getBytesLoaded();

FRAME 3
if (cur != tot)
gotoAndPlay(2);
else
stopAllSounds();


What that will do is loop through three frames until your movie is loaded completely (don't forget to change the name of the movieclip to match). Once it is completely loaded, it will trigger the stopAllSounds() and continue through the timeline.

Hope that helps ya, comrade.

leky
11-24-2001, 02:55 PM
I did that

Thanks for reply 20 Ton Squirrel
I tried your advice but still couldn't work.

Let's me explain my work a bit more......

I have my main movie and I put movie clip that contains 2 button (sound on/off)

sound on I put
stop ();
v = new Sound();
v.attachSound("episode");
v.setVolume(75);
v.start(0, 50000);

and sound off I put
v.stop()

It worked fine in the main movie...
In menu bar (movie clip) I have a button to show another movie clip

on (release) {
main.attachMovie("att4", "newname4", 1);
}

This clip (att4) that contains another button to load the second movie. In this button I put stop all sound and loadmovieNum
It also work fined but the soundloop background in second movie won't work. It worked only sound toggle when rollover the buttons in second movie.

I also tried to create new movie file that contains nothing just only one button to load another swf in MC. It also couldn't hear sound loop background in there but could here sound effect when roll over the button inside.


Did I do anything wrong? Do you have any idea or suggestion?
Please help me, I stuck with this almost three days

Thanks in advance

Cheers

Leky