Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

mhulse/simple-as3-preloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About:

Simple AS3 swf preloader using GreenSock's LoaderMax.

Document Class Dependancies:

Add the above packages to your classpath.

Required flashvar:

  • "swf"

    Path to loaded SWF file.

Optional flashvars:

  • "link"

    Link to visit when clicked.

    Default is no link.

  • "window"

    • "_self" specifies the current frame in the current window.
    • "_blank" specifies a new window.
    • "_parent" specifies the parent of the current frame.
    • "_top" specifies the top-level frame in the current window.

    Default is _self.

  • "loader"

    Hex color of loader graphic.

    Default is #ffffff.

Usage example:

Javascript (using SWFObject):

<script type="text/javascript">
    <!--
        var flashvars = {
            swf: 'child.swf',
            link: 'http://www.google.com',
            loader: '#FFFFFF',
            window: '_self'
        };
        var params = {
            scale: 'noscale',
            menu: 'false',
            bgcolor: '#000000',
            allowscriptaccess: 'always'
        };
        var attributes = {}
        swfobject.embedSWF('loader.swf', 'hd', '630px', '320px', '9.0.115.0', false, flashvars, params, attributes);
    //-->
</script>

HTML:

<div id="hd"></div>

TODO:

  • Show percent loaded.
  • Make preloader graphic "grow" based on percentage loaded (currently just using looping movieclip).
  • Fade out preloader graphic before showing loaded SWF.
  • Make code more modular?

Changelog:

  • v1.0: 2011/05/05
    • Initial public release.
    • Uploaded to GitHub.

About

Simple AS3 swf preloader using GreenSock's LoaderMax.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors