PDA

View Full Version : loading movie



pspecial
June 21st, 2003, 10:04 AM
I have a button that I want to have load a movie when pressed. It works, howerver, the movie loads in a separate window instead of the the main timeline where I would like it to. How can I correct this?

Here's how I have it scripted now:

on(release) {
_root.loadMovie("microphones.swf", "placeholder");
}

Voetsjoeba
June 21st, 2003, 10:10 AM
on(release) {
_root.placeholder.loadMovie("microphones.swf");
}

Might work ;)

pspecial
June 21st, 2003, 11:32 AM
THANKS!

You replied to my other thread about preloading an external file.
I still havent gotten it to work yet. I think my problem with it logically is that the loadMovie command comes after the if - then condition. How can I get the preloader to calculate bytesLoaded from a movie that hasnt loaded onto the timeline yet?

Schematically, this is how my path looks like:

_root.

_movieclip

_placeholderMC

_external movie .swf

I have a movieclip on the main timeline that contains a placeholder into which the external .swf movie loads.

Where in the world would I put the preloader??

Voetsjoeba
June 21st, 2003, 12:38 PM
I just reviewed my other post and forgot this : you should have this right ?


_root.bytes_loaded = Math.round(this.getBytesLoaded());
_root.bytes_total = Math.round(this.getBytesTotal());
_root.getPercent = _root.bytes_loaded/_root.bytes_total;


Should be


_root.bytes_loaded = Math.round(_parent.getBytesLoaded());
_root.bytes_total = Math.round(_parent.getBytesTotal());
_root.getPercent = _root.bytes_loaded/_root.bytes_total;


And the loadMovie command should indeed before this code. If that doesn't work, post again :)