all groups > flash (macromedia) > october 2003 >
You're in the

flash (macromedia)

group:

Preloader - Urgent!


Preloader - Urgent! Yngve
10/24/2003 9:05:20 PM
flash (macromedia): I have a preloader which is working very slow, it works by loading frames.

How can I make it go quicker, also does the preloader load faster by using KB load, and how do I do this?


I need this solved soon, because of the launch date, is coming very close!

Any help is greatly appreciated!


Re: Preloader - Urgent! phatkow
10/24/2003 9:41:26 PM
preoaders load time is based on the amount of bytes it has to load - the only way to *speed* the preloader is to make your movie lighter - either by optimizing or removing uneeded assets at your own discretion - could also break up your movie into several/smaller swf movies and load them into a parent movie - this would avoid having all your assets in 1 big flash movie that has to be preloaded for a long time.
you could also try starting the movie aonce 60-70% of the movie has been loaded (as opposed to waiting for 100% of the movie to load).
but regardless - without seeing your preloader code - not too much we can suggest.....

chris georgenes
mudbubble.com
Team Macromedia Volunteer for Flash
Re: Preloader - Urgent! Yngve
10/26/2003 3:23:17 PM
My preloader is working extremely slow, even if when the preloader is finished and you enter the site again, the preloader is as slow as if you entered the site only once.


This is the code I am using:


On frame 1:

percent_loaded = 17;
total_frames = 260;
LOADED_FRAME = 45;

On frame 40:

if (Number(percent_loaded)>=100) {
gotoAndPlay(60);
}


On frame 44:

ifFrameLoaded (LOADED_FRAME) {
percent_loaded = int((LOADED_FRAME*100)/total_frames);
LOADED_FRAME = Number(LOADED_FRAME)+1;
}

On frame 45:

gotoAndPlay(40);


Is there any reason why this works so slow, have I done something wrong?

Would a KB preloader work better?

Please help me.

Thanks.




Referring URLs
http://swiftz.net/FLASH-SITE/index.html



Re: Preloader - Urgent! phatkow
10/26/2003 4:15:48 PM
i checked yer site (cable modem) and i think 1 big inherant problem is that your site is all 1 giant monster SWF weighing in at over 1.6MB - this is huge - you should never make users have to load this much content initialy - especially if they are on slower connections.
i would seriously re-think you overall structure and break up your movie/site into smaller sections (SWFs) and use loadMovie to load them in when user requests them (via a button) only.

check:
http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary423.html

http://www.flashbax.com/loadmovie.htm

http://www.cbtcafe.com/flash/loadmovie/loadmovie.html

and then check these for preloaders - i have not tested yours - but since there are millions of examples easily accessible via the web:
http://www.flashkit.com/movies/Scripting/Preloaders/

and your own google search will yield tons more.....

good luck - let us know what you end up doing...and/or if you need more help with anything more specific....

chris georgenes
mudbubble.com
Team Macromedia Volunteer for Flash
Re: Preloader - Urgent! Yngve
10/26/2003 4:31:00 PM
Hi, again.
Yes, I see your point, but my site is built up in the way you are talking about.

First I have one initital preloader (which only loads the site itself), then all the sublinks (5 in total) have one preloader each, however they are slow, even the second time I load them, what is wrong?



Re: Preloader - Urgent! laythss
10/27/2003 4:31:43 AM
allright, I am not sure how your code realy is supposed to work, and let me say it in the begining that I am no expert in flash, but I just tested your code in an empy movie, and I think either you missed mensioning something, or I think your code does not do it's job. Let me explain:

With the code you wrote it will not matter what your connection speed might be, you will at least have to wait for 1:30 minutes to 2:00 minutes, it will not make a difference if you already loaded the movie before or not, becuase the time I am stating is in direct relation to your loop.

Meaning:
If you did not miss mentioning something, your pre-loader, is not realy a preloader, but more like a TIMER. the reason is becuase the way you made your "preloader" is INDEPENDENT of how your movie is loading, you have no _getbytesloaded , you have no _framesloaded , or anything that seems to be like them.

HERE IS WHAT HAPPENS IN YOUR PRELOADER when i tested it:

FRAME 1:
you are giving values for your equations:

// this one makes this variable (which supposed to be the %loaded) 17, this should not be decieded by you,
// but calculated from information your movie gets from what is being loaded
percent_loaded = 17;

// another variable that is given value by you, I think this can be easily fixed by using ft=_Totalframes
// _totalFrames actualy asks your movie how many frames it has and assumes that value. Check it in the refrence
total_frames = 260;

// again the same issue, this should be done using fl= _framesLoaded
//_framesLoaded actualy asks the movie, how many frames have been loaded at this time and assumes the value.
LOADED_FRAME = 45;

FRAME 40:
// will be completely useless is showing the real loading of your movie becuase your values are given by you
if (Number(percent_loaded)>=100) {
trace(">100");
gotoAndPlay(60);
}

allright here is a what I would do:
FRAME 1:
keep this frame empty of action scripts

FRAME 2:
if (_framesloaded < _totalframes) {
// the variable percent would show how your movie is loading (percentage wise)
percent = (_framesloaded/_totalframes)*100;
gotoandplay (1);
}

that should do the trick as long as you have more frames with things in them in the movie you will enter these action scripts in, for a more accurate and preloader, I would use _getbytesloaded, and _getbytesTotal, but this should be a step in the right direction.

I hope this helps.
Layth


Re: Preloader - Urgent! Yngve
10/27/2003 6:18:36 PM
Hi again.

I did not quite understand what you wanted me to do.

Is it possible for me to send you the .FLA for my preloader so you can see what is wrong?

Thank you very much for your assistance.


Re: Preloader - Urgent! laythss
10/28/2003 2:25:06 AM
send it me at :
laythss@aol.com


AddThis Social Bookmark Button