First preloader (site preloader)

In you will find this code:

public function onSiteLoadStart():void
    preloader.tf_file.text = "";
    preloader.visible = true;, .5,{alpha:1, delay:.2});
public function onSiteLoadProgress(event:Object):void
    preloader.tf_file.text = event.loadingFile + " (" + event.percentOverall + "%)";
public function onSiteLoadComplete():void
    preloader.tf_file.text = "Loading complete!";, .5,{alpha:0, delay:.3, onComplete:sitePreloaderInvisible});
private function sitePreloaderInvisible():void
    preloader.visible = false;

Content pages preloaders

In, you'll find this code:

private function onPageLoadStart(event:FlebEvent):void
    varcentral.basePreloader.visible = true;, .5,{alpha:1, delay:.2});
private function onPageLoadProgress(event:FlebEvent):void
private function onPageLoadComplete(event:FlebEvent):void
    varcentral.basePreloader.gotoAndStop(100);, .5,{alpha:0, delay:.3,      onComplete:pagePreloaderInvisible});
private function pagePreloaderInvisible():void
    // Hide the preloader completely after the fade out animation
    varcentral.basePreloader.visible = false;

Testing the preloaders

Before uploading our site to the web servers, it is important to check if the preloaders work as expected. FlashDevelop does not provide a "Simulate Download" tool , as Flash IDE does. An very useful alternative is to use sloppy.

Using sloppy with fleb

  • Download sloppy from the link above.
  • Run sloppy.jnpl.
  • The sloppy window will open. In the address field enter:


  • Select the connection speed to simulate (eg. 512K).
  • Press Go.

That's it! Don't forget to clear the browser cache everytime you want to simulate it.


More coming soon…

Post A Comment

Anti-Spam Quiz: