where -FileName - File name for download. Required!; -colorLow:uint - The color of the lower sprite showing already past progress. Default value 0xeeeeee; -ColorHi:uint - The color of the upper sprite showing the rest of the progress. Default value 0x444444; -ColorSlider:uint - The color of the moving slider. Default value 0xeeeeee; -AutoCenter:boolean - Specifies whether to align preloader, in the middle of the parent object. Default value TRUE; -FontName:string - The name of the built and registered font. Default value "PreloaderFont" (system font Arial); -FontSize:uint - Font size. Default value 30; -AutoStart:Boolean - Start downloading immediately after the. Default value TRUE; -OnLoaded:Function - The function is called after the upload. Default value NULL.
4. Add preloader to the object or stage:
stage.addChild(prl);
or
SomeObject.addChild(prl);
5. After using the object, you must remove it from the display list:
stage.removeChild(prl);
or
SomeObject.removeChild(prl);
6. If the AutoStart=false, then you can start the download process manually using the function ryLoader.StartLoad(); 7. Can manually set the value per cent, using the function ryLoader.Progress(pos,maxpos):
prl.Progress(pos,maxpos);
where -pos:Number - volume of downloaded data; -maxpos:Number - total amount of data.
You can use one parameter to indicate interest from 0 to 100:
Preloader is a descendant of Loader.
1. Import the class preloader:
2. Declare a variable of type PreloaderObj:
3. Create an object PreloaderObj using default values:
or using your own settings:
where
-FileName - File name for download. Required!;
-colorLow:uint - The color of the lower sprite showing already past progress. Default value 0xeeeeee;
-ColorHi:uint - The color of the upper sprite showing the rest of the progress. Default value 0x444444;
-ColorSlider:uint - The color of the moving slider. Default value 0xeeeeee;
-AutoCenter:boolean - Specifies whether to align preloader, in the middle of the parent object. Default value TRUE;
-FontName:string - The name of the built and registered font. Default value "PreloaderFont" (system font Arial);
-FontSize:uint - Font size. Default value 30;
-AutoStart:Boolean - Start downloading immediately after the. Default value TRUE;
-OnLoaded:Function - The function is called after the upload. Default value NULL.
4. Add preloader to the object or stage:
or
5. After using the object, you must remove it from the display list:
or
6. If the AutoStart=false, then you can start the download process manually using the function ryLoader.StartLoad();
7. Can manually set the value per cent, using the function ryLoader.Progress(pos,maxpos):
where
-pos:Number - volume of downloaded data;
-maxpos:Number - total amount of data.
You can use one parameter to indicate interest from 0 to 100: