flash (macromedia):
here is a little tut from kirupa http://www.kirupa.com/developer/flash5/preloader.htm Dan [quoted text, click to view] "oepx" <webforumsuser@macromedia.com> wrote in message news:ct6iag$pqf$1@forums.macromedia.com... > how exactly does a preloader work? im doing a site that is displaying images > and i would like to be able to freely place a pre loader anywhere the image > loades but i dont understand how they work. is it just code that you place > before the keyframe of th image or the tween into the image? can somebody > explain this to a beginner? >
how exactly does a preloader work? im doing a site that is displaying images and i would like to be able to freely place a pre loader anywhere the image loades but i dont understand how they work. is it just code that you place before the keyframe of th image or the tween into the image? can somebody explain this to a beginner?
They continuosly checking (either by using a setInterval or onEnterFrame loop) the getBytesLoaded() and getBytesTotal() properties of a movieclip. So, you can get the percent by doing: myMC.getBytesLoaded()/myMC.getBytesTotal()*100 where myMC is the movieclip you are preloading. And then you can use the MovieClip's Drawing Methods, to draw a bar depending on the percent.
If you are using MX04, I recommend the MovieClipLoader class. It has an onLoadProgress event. So in that case, it just means you have some code that runs every time there is progress in the loading. Remember that when you are loading (regardless of whether you use loadMovie or MovieClipLoader) the original contents of the movie you are loading into will be replace ? artwork, code, mouseEvents, etc. So you won't want to put the pre-loader in the same clip as the movie you are loading into. Additionally a lot of people have code in there that does something once the external file is loaded. You know: scale it, fade it in, fly it onto the stage, etc. Depending upon what you are trying to do, this part can be a bit tricky.
[quoted text, click to view] shush wrote: > Hi i have created a flash site, but feel i need a preloder as it runs rather > slow could u please suggest where and how i can place a pre loder and the best > option please? thanx the site is at http:/ www.mpgcontracts.com > SWF, Lock & Load creates Flash preloaders.
Hi i have created a flash site, but feel i need a preloder as it runs rather slow could u please suggest where and how i can place a pre loder and the best option please? thanx the site is at http:/ www.mpgcontracts.com
Don't see what you're looking for? Try a search.
|