Help with a preloader required please

Hi, can anyone out there help me to sort this pre-loader for me and to see if it works properly? It’s not so easy to test them yourself if you have a fast connection.

In Flash, I think I’ve seen an inkling that it should work - it does seem to get to the end of Scene 1 and stop.

BUT

testing the SWF in IE results in an alert poping up to say that " A script in this movie is causing Macromedia Flash Player 6 to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?

Have a look for yourselves - www.uk-martin.pwp.blueyonder.co.uk/pre-loader.htm

Also, the pre-loader seems to loop through both scenes, in defiance to the “Stop” scripts.

Also, the enter button is sticking, well it’s not working the way it should for me. A solution to how to make it click through to the next scene would be appreciated.

Since zipping the file up, I have made the following change to the script:

on (release)
{gotoAndStop(“main”, 1);
}

has been replaced by this:

on (release)
{
gotoAndStop(“main”, 1);
}

Unfortunately, this has not fixed the problem.

All help would be appreciated.

Thanks in advance

Martin

hi,

You kept your btn inside a movie clip that is why that problem. you just write in ur enter btn

on(release){
_root.nextframe()
}

it will work !

Your file is edited and attached here

Regards
Ajo

and to get rid of the script alert replace:

if (bytesLoaded < bytesTotal){
gotoAndPlay(2);
}else gotoAndStop(3);
trace(“loaded”);

for:

if (bytesLoaded == bytesTotal){
gotoAndPlay(3);
}

i guess somehow the:

gotoAndPlay(2);

is causing the movie to go beserk (?)

if (bytesLoaded == bytesTotal){
gotoAndPlay(3);
}

if you use this , it will not take as a pre loader just because of there is no else statment to loop till load.

try this:

if (bytesLoaded() >= bytesTotal() ){
gotoAndPlay(3);
}else{
gotoAndPlay(2)
}

it will because frame 2 says

gotoAndPlay(1);

oh you mean;

if (bytesLoaded() >= bytesTotal() ){
gotoAndPlay(3);
}

gotoAndPlay(1)

sure it will do.

sorry ajok but:

if (bytesLoaded() >= bytesTotal() ){
gotoAndPlay(3);
}

gotoAndPlay(1);

within the first framescript causes my flash.app to freeze already at outputting the movie, it goes even more beserk than with what uk_martin posted initially

gotoAndPlay(1);

must be in the second frame

ofcause in a same frame if u write this it will make probs.

in between looped frames there will be a check
i mean it ;

// frame 1
if (bytesLoaded() >= bytesTotal() ){
gotoAndPlay(3);
}

//frame 2
gotoAndPlay(1);

i didn’t put the comment, that created the confuction ! thanks

Thanks for your help guys, so far I have used AJOK’s solution to the button script -

on(release){
_root.nextframe()
}

This works, so thanks for that.

I have also used AJOK’s recommended solution to the pre-loader script -

if (bytesLoaded() >= bytesTotal() ){
gotoAndPlay(3);
}else{
gotoAndPlay(2)
}

As can now be seen on www.uk-martin.pwp.blueyonder.co.uk/pre-loader.htm it seems to work OK with only the one issue left to resolve…

That is, There is supposed to be a progress barr and a numerical percentage readout of the loading progress, which doesn’t seem to be working. Any clues as to why that is?

OK so I did the changes after the first 3 replies were posted.
The tech talk in the subsequent replies is something which I need to get my head around, so further changes may follow, especially if the progress readouts issues can be resolved.

Thanks again for your continuing help folks.

Martin

you can drop the else-part since the playhead is going to frame 2 anyway

and ajok if your last post is what you suddenly meant then your second post doesn’t make sense, since you also assumed in that post there was looping between frame 1 and 2 (otherwise you wouldn’t have sent the playhead to frame 2)

Hi guys

The proof of the pudding is in the eating. The movie works with the “else” line in it, and it works without it, so in the best minimalist traditions, I’m going to go without it.

What is still needed though, if anyone can help, is the progress bar and text readout.

This movie started life as the tutorial at http://www.kirupa.com/developer/mx/percentagepreloader.htm

Unfortunately, since adding my other bits and pieces to it, the numeric percentage readout and the loadbar no longer function.

Help in getting these to work would be appreciated.

Thanks

heya martin, could you please up the file

Hi

Thanks again for the offer of help

As this is a learning experience for me, I decided to start from scratch and rebuild the FLA file from the ground up. This time, things went well…the load bar works, and the numeric display works…the buttons work…

But now I have a new problem. It takes ages for there to be any sort of display whilst loading. Simulating the 56k modem speed in Flash, the display is solid blue for about 30 seconds, and then the preloader shows the load bar climbing up, from a pont about at about 80% loaded.

I would ideally like the first 80% of the load time showing a progress display, not just the final 20% of the time for obvious reasons.

Oh, and yes the final SWF file IS 225KB big, which is why a functional pre-loader is so important to me.

If you can see why there is a delay in the display of the load bar and load text, then I would be grateful to hear from you.

BTW, the latest SWF file is uploaded so you can see how it looks at: www.uk-martin.pwp.blueyonder.co.uk/pre-loader.htm

Thanks

Martin

Oops, sorry, the FLA file was too big. I’ve uploaded it to my personal server though so you can get it from here…

www.uk-martin.pwp.blueyonder.co.uk/pre-loader.zip

Thanks,

Martin

404 Not Found, please try again

Just worked for me, would you like to try again

Hi,

I made the changes that you suggested, but with no change in performance.

Any other ideas?

Martin

martin your preloader works fine the way you uploaded it… there isn’t much content in there yet so the bar goes like swoosh >>>>>>> more of tasia

Have you still got the old SWF in cache? I fell for that one too! The SWF file is 225kb big which ought to take about a minute on a 56k modem, but as I have broadband I am spoilt, and it comes down lightning quick here too.

In Flash itself, I simulated a 56k modem, and it takes about 40 seconds before there is any sort of display at all. It this repeated in your Flash previewer?

One other thing, can a Movie Clip be actively resized and repositioned at the press of a button? What I am interested in is in having a MC with navigation buttons in it (kind of a control panel) sized 1px by 1px and stored neatly in the top left had corner, out of the way, which at the press of a button, grows to, say 300px x 200px with its top left hand corner still in the top left corner of the main movie.

Needless to say if it can be done, the script to reverse the proceedure will also be needed, bearing in mind it will need to be activated from a button on the movie clip itself.

Look forward to hearing from you.

Thanks

Martin

the thing about the first frame showing up so late is because you have something heavy in frame 1, it’s the heaviest object in the movie, so best to drag that to frame 3 or so

i never had a good look at that bandwithchoker-thing in the player, mucho thanks for mentioning :slight_smile:

as for what you want with that zooming nav-thing, i could cook up something but i’m afraid i’d be an inferior result compared to what the guru have posted already, so either you get lucky an someone reads this and has something you want it or you can search this forum

good luck, meisje