External JPEG file preloader

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 …

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.


Don't like it? There are lots of published articles, pick a random one.

oCricket

Brajeshwar posted this article on Wed, Sep 15th, 2004 at 4:00 pm
Categorized under Technology and has the following tags

Prev Article: Source Files, Downloads, FLAs, Actionscripts

Next Article: The Village


Possibly Related Articles

Archives: Visit the Archives for more articles.

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.

  1. 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).

  2. Is it also possible to add a progressbar to this loader?

  3. >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!

  4. This can also be used to preload swf files :]

  5. 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

  6. 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.

  7. 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.

  8. 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

  9. 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.

  10. Whats the actual method used to find out the bytes total of the JPG image thats loading….

    ??

  11. 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.

  12. Where can I find the method to decompress JPEG (the algo)?

  13. Niccceee pagee

  14. Yeeeahd, it’s csool

  15. 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.

  16. 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…..

  17. Stephen Boyd June 28th, 2004 at 10:52 pm 17

    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.

  18. Nice work! You’d think the code is rather obvious yet … here I am :D

  19. 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?

  20. 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.

  21. Damn kewl Script!!!
    Its working really well. Thanks Braj.

  22. 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!!

  23. 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.

  24. How can I use this preloade in thumbnails? I mean, display all the thumbnails as buttons instead of the PREV | NEXT buttons.

  25. “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

Sidenotes

Quick notes, scribbles, somehow related to this website and to what I do. Or perhaps I'm just plain lazy to make them into a full article.

Fedora 10 Released

Let's talk history! Fedora was created in late 2003 as a Linux based Operating System which gives the users an admittance from anywhere in the world to the most up-to-date free and open source software ...28th Nov, 2008

Top 25 Hottest Indian Web Companies

Note: User submitted article. Personally, I would advise not to take this video seriously. 21st Nov, 2008

India gets ready for Free and Open Source Software

Over the years, FOSS.in has attracted thousands of participants, and the speaker roster reads like a "Who's Who" of FOSS contributors from across the world. FOSS.in is a non-commercial event organised and run entirely by FOSS ...21st Nov, 2008

Cooliris for the iPhone

Cooliris is the browser extension that revolutionizes the way you view media on your computer. It is now available as an application for your iPhone! Cooliris for the iPhone allows you to search the web ...22nd Oct, 2008

Adobe releases Flash Player 10 (Mac, Win & Linux)

Adobe have released the shipping version of Flash Player 10 for Mac, Windows and Linux. More about Flash Player 10 * About Flash Player 10 * Get Flash Player 10 (Official Release version 10.0.12.36) * Download Debug and Standalone ...15th Oct, 2008

View the Sidenotes Archive

Play the Penguin Game

Recommended

  • Ode to Apple Dedicated to Apple - Mac, iPhone, iPod, iTunes, Quicktime, Apple TV and all the awesome softwares for the Apple Mac.
  • AS 2.0 Reference Reference for ActionScript 2.0 Programming Language used in Flash. Primarily stashed here for my own personal reference.
  • Forum Oinam’s technical discussion forum where developers and designers can discuss all technical topics.
  • o! Just Me Of colorful cultures, entertainment, media, life hacks, music, books and movies from hollywood & bollywood.
  • My Special Job My Special Job is a place where you can look for your weird necessities, strangely superb employees, when your need are more of those hackers, geeks, and ultimate rockstars in the Internet Technology.
  • Not Safe for Work Ever clicked a link and felt embarrassed with the content in front of your co-workers? Ever caught unaware because the funny link your friend sent was a little beyond funny? Let’s minimize that with NSWF.
  • Downloads All downloads, Free and Open Source.

Download free Brajeshwar Wordpress Theme

Brajeshwar

Brajeshwar I firmly believe in keeping things simple, easy for users and I envison pushing the technical envelop time and again for the betterment of viable commercial and practical applications. More about me.

Brajeshwar's affinity with Adobe

My Photos

More photos on Flickr

Member of 9rules Network

Since its inception on 11th June, 2001, "Brajeshwar" has 898 Articles and 6,109 comments, contained within 21 categories and 1,372 tags.