By default Flash places text in something called the Runtime Shared Library.
This is an independent file that contains all the font information.
If you don't revisit you publish settings when you export to swf flash will create a small file called textLayout_number (with a extenssion "swz ") together with the swf, in the same folder.
This small file contains the text-info for the swf. If you don't upload it to the server with the rest of the swfs and html the project will not work properly, and it will interfere with the preloader.
|
|
In most cases you don't need this default separationof material and You should rather set all text-info to be included in the swf file
|
|
To set all text-info to be contained within the file:
Go to File>Publish settings and get the dialog box/
Click on the Script: ActionScript3.0 >settings button/
Find the Library path Tab (mid page)/
Towards the bottom of the page, set Default linkage from "RuntimeSharedLibrary (RSL)" to "Merged into code".
Once you change the settings, the nest swf you compile will include all text information and you will be able to READ your loading text.
If you haven't made this change, instead of your preloader, you will see a strange animation of several dots and eventually the content, or you might not see the text content of your file at all. |
WHAT A PRELOADER IS MADE OF: An animation inside a movieclip and a script
You will use a preloader to warn, meassure and entertain the user meanwhile the full content of a file is loaded in memory.
A preloader is a script that holds the file at a starting point (usually frame 1) until the script checks that all the frames of the main movie are loaded (in RAM of the local computer). When that condition is met, the script sends the playhead to a frame (usually frame 2) where the main content can begin to play.
|
A preloader is made of:
1) An ANIMATION, that will be displayed (on frame 1) until the loading process is completed.
2) A Script (on the same frame than the animation), that describes the details of where the file is held, were it will go when all the frames are loaded.
|
The script will also create a percentage display, to show the user the loading progress graphically (it will take that information form the calculus that is already performing to track all the loading).
Finally you can also use the script to create an animation that advances as the loading takes place, by attaching properties of a movieclip/s (X ,Y, rotation, alpha, scaleX. scaleY...) to a variable/s used in the code. |
TYPES OF PRELOADERS: Root and external preloaders
You can place a Preloader at the very beggining of a flash movie that contains all your project (on frame 1 of the main swf file).
This is called a ROOT preloader. |
Root preloaders are used at the head of games that contain a lot of assets (or those in high quality) or in any project that needs to show, from the very beginning a lot of content. |
|
You can place a Preloader at the moment of loading an extrenal swf file to your main project. This is called an EXTERNAL preloader.
This option is very convenient when you have
a whole section that is built as an external file and it ends being a bit heavy on file size.
The code for the preloader in this case, gets combined with the loading code: Flash is loading an external file, calculating how big it is, and placing a hold on the external file's timeline until the whole file has arrived. |
|
|
|