Base swf

Overview

The base.fla consists of:

  • A background movie clip.
  • A gradient movie clip (on top of the background).
  • A static textfield "BASE".
  • A preloader.

If you want to customize any of this, check the following.

The gradient

In base.fla the gradient is the bg_gradient movie clip from the library.

In Base.as the gradient is controlled by the following two lines:

43 public var bg_gradient:MovieClip;

125 bg_gradient.width = varcentral.flebStage.stageWidth;

The preloader

In base.fla the preloader movie clip consists its subparts (text, background color, etc.). Two parts are controlled by Base.as: the tf_file dynamic textfield and the progress bar.

In Base.as here is the code that controls the above assets:

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

Changing the frames per seconds

In fleb, the default FPS is 30. When I publish flash movies, I like to use 60 fps. It really smooths the animations compared to 30. Just open Base.fla and set here 60 fps.

Post A Comment

Anti-Spam Quiz: