Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with loadmovie

Status
Not open for further replies.

HumanBean

Technical User
Oct 1, 2004
13
AR
Hi, I need some help with loadmovie in flash

I've a movie wich contains a "home" layer and other layers for different sections of the site.
each of these sections have an horizontal button bar on the bottom and the logo on the top.
In another layer, behind all this there's an empty movieclip where the content loads. it's something like this:

load_movie.loadmovie ("/content_movie.swf",1)

the movie loads correctly, but this is my problem:
This exteranal movies consist of the content, and a loader for the content (each in a different scene). The problem is that, instead of showing me the loader while it loads the movie, it stays blank until it loads the whole movie. I need the loader to apperar first, so you can see when it's loading. Do you know how can I solve this? Thanks in advance
 
Don't think you're loading the movie in your container clip, but on level 1 instead...

It should be...

_level0.load_movie.loadMovie("/content_movie.swf");

No #1 as the second parameter...

As for your preloader not showing up... Would have to see your preloading code... Are you using references to _root in this preloader code? If so, when loading this movie in a container clip of another main movie, those point to the root level of your main movie, and not to the root level of the being loaded movie...


 
the external movie has 2 scenes
this is the code for the loader, wich is in one scene, the content is in the second scene.
I don't undersand clearly the _root thing you told me about, but here's the code. IF you know how can I fix it, please let me know

function cargando() {
var total, cargados, porcentaje;
total = _root.getBytesTotal();
cargados = _root.getBytesLoaded();
porcentaje = Math.floor((cargados*100)/total);
porcentaje_txt.text = porcentaje+" %";
loader.gotoAndStop(porcentaje);
if (cargados == total) {
clearInterval(hiloPrecarga);
play();
nextScene();
}
}
var hiloPrecarga = setInterval(cargando, 1);
stop();
 
Try this...
Code:
function cargando() {
    var total, cargados, porcentaje;
    total = [b]this[/b].getBytesTotal();
    cargados = [b]this[/b].getBytesLoaded();
    porcentaje = Math.floor((cargados*100)/total);
    porcentaje_txt.text = porcentaje+" %";
    loader.gotoAndStop(porcentaje);
    if (cargados == total) {
        clearInterval(hiloPrecarga);
        play();
        nextScene();
    }
}
var hiloPrecarga = setInterval(cargando, 1);
stop();
 
thanks, I'll try that
 
hmmm that doesn't seems to work, maybe because they're in different scenes... but I test it in debug mode and it stays blank... nothing happens
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top