As you know JPEG is an image file format, so cannot contain any preloader/decisions and cannot perform any operation within movie. So it becomes problem for users (using slow dial-up connections), because they cannot see anything while JPEG is being loaded. So we decided to create a customizable plugin which will start automatically when any JPEG file is being loaded.
This tutorial demonstrates how to create a percentage preloder for JPEG file loaded in your movie from an externally JPEG file.
I have created three levels sources (beginer, intermediate, advanced)
What components you can customize ?
- Place preloader anywhere in movie
- Use custom color of preloader text
- Custom Message while image being loaded (within swish)
- Enlarge and stretch back the text of preloader
- Use desired animation for progressbar
- Place the progressbar animation anywhere
- And you can load different JPEG files at runtime
- Set custom Alpha (Transparency) value of loaded JPEG
Features
- Automatically starts when JPEG is loaded
- Shows total size of JPEG file as well
- Very useful when creating especiallt albums
- External JPEG can be loaded from any URL as well
Limitations
- The Sprite must not be Masked
- JPEG must be loaded in sprite named image
We start tutorial of each level one by one
Beginer
It is assumed that you have downloaded the beginer level resource.
Steps
- Open beginer.swi There is only one Sprite, which contains two sub sprites
- one is simple unnamed Sprite and other one is image
- open sprite named image. You will see an action on its first frame (frame 0) as LoadMovie->image.jpeg
- click it and change name of JPEG filename to the filename you want to load.
Intermediate
It is assumed that you have downloaded the intermediate level resource.
Steps
- Open intermediate.swi There is only one Sprite in it which contains three sub sprites
- The first one is 0x336633, second bar and other one is image
- if you want to customize color of precentage being shown then get hex of desired color first
- second add 0x before it and name the first sprite same. For example you want blue color for percentage letters, value of blue in hex is 0000EE What will you do? just name the first sprite as 0x0000EE (just adding 0x)
- open sprite named image. You will see an action on its first frame (frame 0) as LoadMovie->image.jpeg
- click it and change name of JPEG filename to the filename you want to load.
- If you want to customize animation o progressbar open the sprite named bar, and create custom animation within it There is only one Control in it which contains three sub sprites
Advanced
It is assumed that you have downloaded the advanced level resource.
By default the movie does not load any JPEG as loaded in previous examples.
JPEGs are loaded on action of Button pressed. In this example, 3 buttons load different
JPEG files in same sprite located.
Steps
- Open advanced.swi If you want a custom message be displayed while JPEG is being loaded (other than "Loading JPEG"), Then you will have to change the name of the first sub sprite which is loading the plugin. As shown in advanced swi. The first sprite's name is 0x336633,Imaging. Note that word Imaging is seperated by , This will be shown on your preloader text while your JPEG is being loaded, as Imaging 9999 Bytes 99% Loaded If you want default color of your text and show custom text as well, then rename your sprite this way ,Imaging. Now click on any of buttons and see its action. You will understand it easily.
- Each button goes into sprite image via Tell Target action
- and loads JPEG using LoadMovie action And note that ProgressBar is entirely different. Actually not a bar. It is like an analog clock. As I said you can put any type of animation instead. But it is better to create smallest swish animation instead of importing animated gif or vectors. So! for
- Creating custom progressbar animation, open sprite bar and change it to whatever you want. Note:- Preloader will automatically start whenever JPEG is loaded within sprite (in level -1) named image.
Regards






