Percentage Preloader with Loadmovie-Action

HI folks,

I just finished making a preloader with the help of the tutorial here. Everything is fine except that it only works with my mainmovie. I don’t see the Preloader in my loadmovies.

Please Help.

Omitofo
-attila-:beam:

p.s.: where I can view the streaming in flash mx?

You will need to put the preloader on your loaded movies as well, not just your main movie.

And for show streaming, hit CTRL+Enter to preview the movie, then hit CTRL+enter <I>again</I> to view it streaming.

CTRL+enter one more time for not streaming again :slight_smile:

… if you want to run through the movie multiple times (restarting it over and over again in right there) CTRL+enter will do it, but doing it once from a tested movie will go to a streaming load, doing again will do a normal full load. So to test, CTRL+enter… to restart again with no stream wait, CTRL+enter CTRL+enter
:slight_smile:

also note: View -> show streaming

LOL, if CTRL+Enter is said anymore times we should just call this the CTRL+Enter thread :wink:

CTRL+Enter :stuck_out_tongue:

i won’t say CTRL+Enter because i have a mac and if you do too then it would be Command+Return or Apple+return if you don’t know what button the command button is… :beam:

COMMAND+RETURN:evil:

yeah why do they have to call it command? pfft
I always used “open apple” or apple… even now I say apple. I mean it IS an apple. Windows has the “windows key”, why cant apple have the apple key?

…my moms still looking for the “any key”

wow, fast reply - thanks guys.

I already knew that I had to add the preloader to my loadmovies but it didn’t worked - can’t see the preloader on my page.
Would you be so kind to check it out for yourself - I have broadband, maybe thats where the problem is - and watch the meditation and vegetarian-section. It must be the same preloader like in my mainmovie in the beginning. Tell me please if you cannot see a preloader.

Omitofo
Attila

p.s.: about this streaming-thing: how many bytes is broadband dsl??? I want to see how fast it is with dsl.

THXTHXTHX

also note:

Debug

menu

Maybe there isn’t enough content to load and need the preloader.

I am on cable, so it loads pretty quickly on my end. And if it loads fast enough, the preloader won’t show. And since all it is is a scrollable textbox and your text effect at the top, it might not even take any time to load.

What is the preloader code you are using?

Also… When putting a preloader in a loaded movie, the _root is no longer the _root (if you are loading to a movie clip), the _root will now be called as _parent, so you can preload the clip that you are loading to, which is what you have to do. If you are loading to a level (loadMovieNum) then you would have to target the level you are loading to, like _level50 or something.

now nothing works anymore.

I changed _root to _parent and now if the loadmovies are loaded the mainmovie goes to the first frame??? no idea

here is the code for the preloader for the loadmovies:

bytes_loaded = Math.round(_parent.getBytesLoaded());
bytes_total = Math.round(_parent.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
_parent.loadBar._width = getPercent100;
_parent.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
_parent.gotoAndPlay(“Vegetarian”, 1);
}

//vegetarian is the mainscene, i changed the name because i thought that this was the mistake

omitofo
-Attila-:crazy: :crazy:

Hmm, odd. Maybe I am overlooking something. Maybe try “this” instead. If that makes no sense, look below.

bytes_loaded = Math.round(_parent.getBytesLoaded());
bytes_total = Math.round(_parent.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay("Vegetarian", 1);
}

ok - didn’t work either.

maybe i don’t know where to add the code.
I created my loadmovies and added in every loadmovie the preloader with the code. Is this right? or do I have to add the code to my mainmovie? I thought it is like in the mainmovie: you create some content and add a preloader - nothing very difficult - but now I have many problems.

Please check the code and HELP ME

Attila
OMitofo:ninja:

Well the way a preloader works is you make your movie.

Then you put the preloader in the first frame or two (depending on the code used).

So the preloader code for your loaded movie does no go in your main movie, it goes in your loaded movie.

So both your main movie and the loaded movie will have a seperate preloader.

thx lostinbeta, did you receive my PM??

I did exactly everything in the kirupa-tutorial for the percentage preloader with loadbar :
http://www.kirupa.com/developer/mx/percentagepreloader.asp
but I do not have a third frame for a continue button i just have 2 frames in my first preloader-scene.

the actionscript for the first frame is:

bytes_loaded = Math.round(_parent.getBytesLoaded());
bytes_total = Math.round(_parent.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent100;
this.loadText = Math.round(getPercent
100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay(“Scene 5”, 1);
}

and the actionscript for the second frame is:
gotoAndPlay(1);

Thats it - I changed the time several times but nothing worked. I changed _root to _parent, gotoAndPlay to _parent.gotoAndPlay etc. …
Can you just give me the code of one of your preloader -maybe this will work.

THXTHXTHX
oMITOFO
aTTILA

;(

I changed the time several times

Sorry!
I changed the code several times.

First: Check the writer of that tutorial :wink:

Second: Do you even see the preloader part and it just doesn’t go to the scene? Or do you not see anything at all, not even the preloading?

If your problem is just not going to the right scene, then you can assign a frame label to frame one of whatever scene you are going to, and then you the code… _parent.gotoAndPlay(“frameName”) to go to it.

does the main SWF load all the associated SWF’s on initial load up, or do the associated SWF"S load when there activated???

i’m finding that my pre-loader only works with the main movie and not when i activate any associated movies. The pre loader is visible on levels 1,2,3 etc but seems doesn’t load anything.

this tells me that all associated movies are loading with the main movie which defeats the purpose of the load movie action. This might answer my question a couple of threads down regarding load up time of my main SWF.

how can can I make level 1,2,3 SWF’s load when there activated???

thanks

No, a preloader in your main movie does not preload your sub movies that you call on using loadMovie. You need to put a preloader in all .swf files you have.

thanks 4 your quick answer.

…yeh i’ve put a pre-loader in all SWF’s, but when the main SWF loads at the beginning 167KB (about 30 secs) everything works fine. When i cal about the SWF for level 1 (190KB) it comes up straight away with no load time at all.

not sure why the secong SWF doesn’t load for about 30 secs like the main SWF does considering there a similar file size??