FrameUtil
| Kind of class: | public class |
|---|---|
| Package: | org.casalib.util |
| Inherits from: | none |
| Version: | 11/02/08 |
| Author: | Mike Creighton, Aaron Clinger |
| Classpath: | org.casalib.util.FrameUtil |
| File last modified: | Thursday, 19 February 2009, 11:33:36 |
Utilities for determining label positions and adding and removing frame scripts.
Summary
Class methods
- getFrameNumberForLabel (target:MovieClip, label:String) : int
- Determines the frame number for the specified label.
- addFrameScript (target:MovieClip, frame:*, notify:Function) : Boolean
- Calls a specified method when a specific frame is reached in a MovieClip timeline.
- removeFrameScript (target:MovieClip, frame:*) : void
- Removes a frame from triggering/calling a function when reached.
Class methods
addFrameScript
public static function addFrameScript (
target:MovieClip,
frame:*,
notify:Function) : Boolean
Calls a specified method when a specific frame is reached in a MovieClip timeline.
Parameters:
target:
The MovieClip that contains the
frame.frame :
The frame to be notified when reached. Can either be a frame number (
uint), or the frame label (String).notify:
The function that will be called when the frame is reached.
Returns:
- Returns
trueif the frame was found; otherwisefalse.
Throws:
- ArguementTypeError if you pass a value type other than a
Stringoruintto parameterframe.
getFrameNumberForLabel
public static function getFrameNumberForLabel (
target:MovieClip,
label:String) : int
Determines the frame number for the specified label.
Parameters:
target:
The MovieClip to search for the frame label in.
label :
The name of the frame label.
Returns:
- The frame number of the label or
-1if the frame label was not found.
removeFrameScript
public static function removeFrameScript (
target:MovieClip,
frame:*) : void
Removes a frame from triggering/calling a function when reached.
Parameters:
target:
The MovieClip that contains the
frame.frame :
The frame to remove notification from. Can either be a frame number (
uint), or the frame label (String).Throws:
- ArguementTypeError if you pass a value type other than a
Stringoruintto parameterframe.