PreloadAnimationSquares

Kind of class: public class
Package:
Inherits from:
  • Sprite
Known subclasses:
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.animation.PreloadAnimationSquares
File last modified: Thursday, 24 February 2011, 22:09:57
The ContentContainer class is designed for the loading and display of html-formatted content that is loaded from an xml formatted document. XML conforms to the DocBook DTD.
Example

  • // add a preloading animation to the center of the stage
    preloadAnimation = new PreloadAnimationSquares();
    preloadAnimation.x = stage.stageWidth/2;
    preloadAnimation.y = stage.stageHeight/2;
    addChild(preloadAnimation);
    preloadAnimation.start();
    // On load complete, end the animation
    function onLoadComplete(event:Event):void
    {
    preloadAnimation.finish();
    }
    
    24 Aug 2010

Summary

Constructor
Instance properties
Instance methods
  • start () : void
    • Fades animation in, starts looping animation timer
  • createShapes () : void
    • Creates shapes and adds them to the display list
  • animate (event:TimerEvent = null) : void
    • Animation for a single loop
  • finish () : void
    • Fades animation out, then sets visibility to false

Constructor

PreloadAnimationSquares

function PreloadAnimationSquares(s:int = 8, c:uint = 0x666666, n:int = 6, sp:int = 20, l:Number = 1, sc:Number = 1.5)

Instance properties

animationTimer

animationTimer:Timer(read,write)

color

color:uint = 0x666666(read,write)

loopSpeed

loopSpeed:Number = 6(read,write)

numShapes

numShapes:int = 7(read,write)

scale

scale:Number = 1.5(read,write)

size

size:int = 10(read,write)

spacing

spacing:int = 20(read,write)

Instance methods

animate

function animate(event:TimerEvent = null) : void

Animation for a single loop

createShapes

function createShapes() : void

Creates shapes and adds them to the display list

finish

function finish() : void

Fades animation out, then sets visibility to false

start

function start() : void

Fades animation in, starts looping animation timer