Still in need of ur help

concerning an external preloader with flash mx…

The preloader tutorial works fine but i am so stupid i cannot use it to load external content…

anyone here who can give me a detail tutorial how to use a percentage preloader on an external loaded movie?!?

look here…

f.e. clicking on intention loads an external movie… i would like the percentage of progress to be shown on the closed door…

plz plz help me…

When loading a movie the _root is no longer the _root, so you will have to do _parent.

That might be your problem.

mhh…

ok here´s the code of the functioning preloader that is embedded in the _level0 movie:

bytes_gesamt = _root.getBytesTotal() add " Bytes gesamt";
bytes_geladen = _root.getBytesLoaded() add " Bytes geladen";
prozent = int(_root.getBytesLoaded() *100/_root.getBytesTotal()) add " %";
if (prozent == “100 %”) {
gotoAndPlay (3);
}

3 dynamic text fields with the variables and all is ok…

if i want to load a movie externally from _level0 to _level50 f.e. how does the code has to be modified?!?

how does the timeline has to look like ?!?

f.e. i use this code:

loadMovieNum(“main13.swf”, 50);

to load my mainmovie to _level50…
i want the progress to be shown while _level50 is being loaded…

thx for ur help…

Hmmm, one for german are we, ok.

Well, you don’t have to worry about levels, just on your preloader of your loaded movie, have a few layers, where your background layers are of the doors. And your preloader layers are above those.

Then change the code to this…

bytes_gesamt = _parent.getBytesTotal()+" Bytes gesamt";
bytes_geladen = _parent.getBytesLoaded()+" Bytes geladen";
prozent = int(_parent.getBytesLoaded() *100/_parent.getBytesTotal())+" %";
if (prozent == "100 %") {
gotoAndPlay (3);
}

ok thx for that :wink:

what i thought of was more likely like that:

onClipEvent (load) {
loadMovieNum (“main13.swf”, 1);
}
onClipEvent (enterFrame) {
var total = _level1.getBytesTotal();
var loaded = _level1.getBytesLoaded();
percent = (loaded/total)*100;
percentDisplay=Math.round(percent)+"%";
if (loaded == total) {
_level1._visible=true;
_visible=false;
} else {
_level1._visible=false;
_visible=true;
}
}

not quite perfect but 1st step …

ollihimself :: Do you know who’s site that belongs to

:q:

ollihimself :: you want the doors to close, and make the external swf load behind the door right, and when it is loaded the dorrs open again right??

LostinBeta :: I dnt think he can have the preloader at the beginning of the external swf coz those doors need to be in the main movie.

If the dorrs where in the external swf, then you will have to wait for the doors to appear first (loaded), and to avoid that i think u need to thave it on the main movie, hope you get what i mean!!

:slight_smile:

No, you can have the closed doors in the external movies preloader, becuase that loads first with the preloader.

So after it preloads the preloader can play a frame that reopens the doors, and the animation will be in the movie that is loaded.

using the above posted script works fine…

have a look…

http://www.oliver-schulte.de/amateur
click on reg f.e.

i had to use a preloader that loads the swf externally because the doors are in the main movie…

here you can see the differnce

http://www.oliver-schulte.de/amateur/main13.swf
click on reg f.e.

therefore a preloader in the external loaded swf would not be visible…

THX … for your advice so far…

and sorry for my bad english … i am just in need of some practise (writing english as well as using flash mx)

Ok, so I am confused now.

Is everything fixed now?

yepp, all works fine

Oh, ok… cool :slight_smile:

ollihimself ::

I was wondering if you can help me figure sumpin out, coz i have a design very similar to yours, and i cant get it to work!!

Can you help me pllssss!!

:smirk:

hi there… ii will do my very best to help u…

ok u have visited my page… all works fine now, because i do preload the external loaded swf from the main movie (wehre the doors are included)…

to do so i use the following script:

onClipEvent (enterFrame) {
var total = _level10.getBytesTotal();
var loaded = _level10.getBytesLoaded();
percent = (loaded/total)*100;
percentDisplay=Math.round(percent)+"%";
alles=Math.round(total/1024)+" KB gesamt";
if (loaded == total) {
_level10._visible=true;
_visible=false;
} else {
_level10._visible=false;
_visible=true;
}
}

ok what does the script?!?
very easy:
If the frame is reached, where the code is embedded it sets 2 variables:
total and loaded… Both refer to level 10 (where my external swf will be loaded into) and give back the total amount of bytes of this swf and the loaded amount of bytes of level10.

After that i have to define what percent is: percent is (loaded/total) *100…

After that i have to tell what should be shown in the 2 dynamic text fields that must be named “percentDisplay” and “alles”…

the if statement is just to display the preloaded content if all bytes are completley loaded…

ok i attach a small fla here so that you can try out… you just have to modify the name of the external loaded swf and the level u want to load it in…

hope that will help… otherwise ask and i will try to help u…

ollihimself :: hey thanks for that!!

I have sent you a PM (private message), so can you please have a look at your PM’s!!

=)