Due to popular demands and complaints from many MM forum users when my previous external JPEG preloader went offline, I am bringing back the external JPEG preloader with a new improvised script. I wasn’t sure if people still liked that preloader, so, I am sorry as most of the files went offline while changing web host. You can download the same w/o image (53 kb) or with image (350 kb).
Please note that there is no preloader for the main movie, so you may need to wait for the 17kb main movie on a slow connection. Take note that the improvement is mainly in the fact that the previous image remains shown while the next image is preloaded.
Brajeshwar posted this article
on Wed, Sep 15th, 2004 at 4:00 pm
Categorized under Technology and has the following tags






Comments Post Yours
There are 26 responses so far. You can follow any responses to this entry through the RSS feed. You can skip to the end and leave a response. Pinging is currently not allowed.
At last i found the jewel i was looking for.
The code is (relatively) simple to understand (provided you know a bit about Objects), documented and most of all : IT WORKS.
thanx for this wonderfull little script that really saves my day/week (been figuring for a few days, how to solve that problem).
Is it also possible to add a progressbar to this loader?
>Is it also possible to add a progressbar to this loader?
Why not, as you see that the percentage indicator is there, besides that just let your progressbar MC to _xscale according to the percentage loaded, simple as a pie. Isn’t it. Enjoy!
This can also be used to preload swf files :]
hi,
can someone please tell me how to call jpeg images from a folder in a computer - in a flash presentation without having to import the files.
thanks-
bumpu
tip: check placeholderMc for its width. If its larger than zero then the jpg has been loaded into the placeholderMc. Only then show the loaded jpg. Otherwise you might make the movieClip visible before the jpg is visible in the movieClip.
Brajeshwar, i used some part of your code and tried to load multiple jpegs in a target clip and i found that on a dsl connection it loads but it wont load on the dial-up. That means that there is some problem in the loop to check for imagebytes. Can u tell me why I would have this problem. Thanks a lot.
I’m trying to use this application for showing over 100 jpegs. I tried to change the “var lastImg = 199″ inside the “preloadjpg.as”
but it still doesnt work. I can see only up to 19 jpegs.
can u help
Hello,
is there a way to call up with actionscript dynamic image filenames off a coldfusion page from the dynamic name #image# and have the flash post it? the reason is so that I can have the picures SQLed together with my data that goes with the picture. If you can help me figure this out, I’d be very happy. I got the coldfusion page ready, I just need to know how to call it into flash. I gave the image the name &picture and it works only with text so far. But I haven’t reached a level of getting it work work with images. please help, I got a p[roject on the go….and I’m such an extreme nubee, I barely know flash, just very simple stuff in actionscript.
Whats the actual method used to find out the bytes total of the JPG image thats loading….
??
Igor; When a SWF file is loaded into a target movie clip, you can use the target path of that movie clip to target the loaded SWF/JPEG file. A SWF file or image loaded into a target inherits the position, rotation, and scale properties of the targeted movie clip. The upper left corner of the loaded image or SWF file aligns with the registration point of the targeted movie clip. So as loading a JPEG is exactly like loading a SWF, you get all the properties like getBytesLoaded, getBytesTotal of the target MC which we are doing here to get the totalBytes and bytesLoaded of the JPEG. With the new Flash MX 2004, it is though suggested and advised to use the MovieClipLoader class instead and leave alone loadMovie and loadMovieNum for just doing the “loading” of SWF/Image to target clips and levels.
Where can I find the method to decompress JPEG (the algo)?
Niccceee pagee
Yeeeahd, it’s csool
How can i have hand cursor over a input textbox?
I should also be able to type text in it.In
short i need to use hand cursor to select textbox instead of blinking cursor.
Hello,
I’ve just a question. How can i do to download all jpeg at the beginning without to click on the button. Thanks a lot…..
Hey thanks man, I’ve been trying to achieve just this effect for a couple of weeks now. Now I see it, it’s an obvious, if rather slick, solution. Write the preloader on the fly each time the image is loaded.
Nice work! You’d think the code is rather obvious yet … here I am
the number of external JPGs that i need to load into my flash movie varies. is there a way to find out how many files will be loaded without having to hardcode the number of images into the action script? i would prefer not even to use a variable, instead, it would be nice if there is a way for the script to “figure out” how many images will be loaded. i know this might get into file system scripting (or something) but i thought it would be possible to add an error check into the actionscript that detects that the next image to be loaded does not exist and then stops loading.
make sense?
Yes Pirco, it makes perfect sense. The only hiccup is that ActionScript do not as of now have a way to check that and neither does it return an error when a file do not exist. So, you have to rely on third party server side script (wrapper in case of offline apps) to do that.
Damn kewl Script!!!
Its working really well. Thanks Braj.
Indeed a beautiful piece of code. I was close to going mad writing a jpeg preloader myself, a few more hours and i would definitely have to say ‘good bye’ to my mental health and then i found this: exactly what i was looking for. Works perfect for me, easy to tweak, thx a lot!!
Where can I download this preloader? The links seem to not work.
It looks very good, please let me know how I can download it.
Thank you.
How can I use this preloade in thumbnails? I mean, display all the thumbnails as buttons instead of the PREV | NEXT buttons.
“How can I use this preloader in thumbnails? I mean, display all the thumbnails as buttons instead of the PREV | NEXT buttons.”
Yeah I need this too! Any help would be GREAT!!!
scola@westnet.com.au
Post yours