[FMX] Detecting Loading Completion

Ok, I have a main movie with two transition elements. They each close together when loading a main category, and i just wanted to kno is there a way that i can keep the stuff behind transitional element 2 closed, even if its done loading, until the stuff behind transitional element 1 is done?

Put a variable in _root, set it to false by default and at the last frame of trans1, set it to true, then add a mc at the timeline of trans2 until at the frame right before the animation you want it to play after trans1 has finished, using onClipEvent(enterFrame) to check if the value has changed, and if it is, make it continue to a particular frame :slight_smile:

lmao… im a noob, cuz i got NO clue about half of wut ur saying… lol…

so how would i create a var an set it false? i’ve done something similiar i think, just how would i set it to true?

open = “true”;

?

I don’t understand the question! :stuck_out_tongue:

hah. go here http://www.electrongeek.net/

you see how the doors only open when both movies are loaded? How would i do that? both the doors are independent transitions

Quite long to explain… I’ve done a little fla for someone recently, the basics are there, maybe you can adapt it to your needs :slight_smile:

thanx, i would attach my fla, but im sure you would scream at me for such sloppy coding, heh

Basically, when you press a button, you play the doors closing, and when you they are closed, you have something like

stop(); // we stay there until next section is loaded
this.container.loadMovie("something.swf"); // we load the section

// preloader
this.onEnterFrame = function(){
        var l = this.container.getBytesLoaded();
        var t = this.container.getbytesTotal();
        if (l && l>=t) {
                play(); // play the doors opening
        }
}

nope ily, thats something different, hehe. or maybe im just looking at it wrong? im not sure. Did you visit that link i posted? If the stuff in the top window is done loading, and the stuff in the bottom window isnt, the top window stays closed until the stuff in window 2 is done loading. then they BOTH open. i have my doors working seperatly. I was wondering if there was a way to have them work seperatly, but check to see if the other was finished loading.

im bad at wording.

No, I’m bad at wording, and I’m tired (and I’m French), sorry. :trout:

Anyway, I think it’s just tweens. Better wait for EG to tell us though…

ok here… my top transition element is 55 frames, on frame 1 i have:

moviecontrol = “NewMovie”;

frame 2 is labeld Test, with nothing in it.
frame 3 contains this code:

if (moviecontrol ne …/:movievar) {
moviecontrol = …/:movievar;
gotoAndPlay(“Start”);
} else {
gotoAndPlay(“Test”);
}

and so forth… now, when the doors are closed, i have this code

if (_root.mainClip._framesloaded < _root.mainClip._totalframes) {
gotoAndPlay(“Wait”);
}

and if they are equal, the doors open. what would i put inside that code to detect if the stuff in my second transition was loaded?

WAIT… im just relooking at your code.

would it be possible for me to declare to more variables that dont exist in the top transition, but do in the bottom? would it be able to read them? or would i have to do something like

var p
var o
_root.var q
_root.var y
?

if i could, then i think that would work

hmmm that exemple is pretty good works for me i’m sorry i dun understand ur queryI:-)

also so ur french big deal were all one!

that example does work, but only for the top element. I have TWO transitions, and both are seperate.

why not load the entire movie before you open any windows… just stick a preloader before your site loads… i think there are like 3 tutorials on preloaders or something… if not… one of them has the technique of loading to a specific frame… not sure exactly how it does it but you should check into that… perhaps check if a specific frame is loaded (the end of trans1 i guess so you know for sure that animation is done loading) then play it and then check if trans 2 is done… and using an if statement check if trans 1 is done before you play trans 2 when its loaded… hope that made sense heh…

eh, im bout to just 4get it, and have them open whenever they want. my head hurts.

yo that exemple thing does not even lea donto how to edit it how to make others ect. so why not tell us?

ok i made like the most simple preloader type thing i could… you can stick an animation saying its loading or whatever you want in there… there are plenty of preloader tutorials… its all just a frame loop with 2 frames… then you tell it to gotoAndPlay(wherever)… pretty simple stuff…

i dont know if this is what you wanted it to do… but its a do-able alternative… i put some comments in the frame 1… and i stuck an image on frame 3 so it actually has something to load

to see the load process and that it actually works… when you go to control>test movie, go to view>bandwidth profiler and then the little bars will pop up, and then go to view> show streaming and you can watch the percent go up as it loads…