EnterFrame

Kind of class:public class
Package:org.casalib.time
Inherits from:RemovableEventDispatcher < EventDispatcher
Version:02/02/09
Author:Aaron Clinger, Mike Creighton
Classpath:org.casalib.time.EnterFrame
File last modified:Monday, 02 February 2009, 08:18:50
Creates a centralized enterFrame event. Also enables classes that do not extend a display object to react to an enterFrame event.
Example:
  • package {
        import flash.display.MovieClip;
        import flash.events.Event;
        import org.casalib.time.EnterFrame;
    
    
        public class MyExample extends MovieClip {
            protected var _pulseInstance:EnterFrame;
    
    
            public function MyExample() {
                super();
    
                this._pulseInstance = EnterFrame.getInstance();
                this._pulseInstance.addEventListener(Event.ENTER_FRAME, this._onFrameFire);
            }
    
            protected function _onFrameFire(e:Event):void {
                trace("I will be called every frame.");
            }
        }
    }
Events broadcasted to listeners:
  • Event with type: ENTER_FRAME - Dispatched when a new frame is entered.

Summary


Class methods

getInstance

public static function getInstance (

Returns: