RetroHilightButton

Kind of class:class
Inherits from:EventButton < EventMovieClip < MovieClip
Classpath:org.asapframework.ui.buttons.RetroHilightButton
File last modified:Sunday, 08 October 2006, 23:42:13
Class to link to a movieclip to create a button with animated hilight behaviour.

The timeline is expected to have 4 labels: "up", "over", "on" and "out", in that order.
There has to be a "stop();" frame script on the first frame, but on no other frames.
As its base class, EventButton, a movieclip named "hitArea_mc" can be used to define the hit area of the button.

The default state is the first frame.
On rollover, the timeline advances from the "over" label to the "on" label, and stays there if the mouse is still over the clip.
On rollout, the timeline advances from the "out" label to the end, and stops at the first frame.
If the mouse is moved out of the clip before the timeline has reached the "on" label, the timeline goes in reverse back to the "up" frame.

Summary


Class properties
Instance properties
Instance methods
Event handlers

Constructor

RetroHilightButton

function RetroHilightButton (
)

Class properties

DEFAULT_FRAME_ON

static private DEFAULT_FRAME_ON:String = "on"
(read)

DEFAULT_FRAME_OUT

static private DEFAULT_FRAME_OUT:String = "out"
(read)

DEFAULT_FRAME_OVER

static private DEFAULT_FRAME_OVER:String = "over"
(read)

DEFAULT_FRAME_UP

static private DEFAULT_FRAME_UP:String = "up"
(read)

Instance properties

direction

private direction:Number
(read)

doOutAnimation

private doOutAnimation:Boolean
(read)

hilightFrame

private hilightFrame:Number
(read)

isAnimating

private isAnimating:Boolean
(read)

mFrameOn

private mFrameOn:String = DEFAULT_FRAME_ON
(read)

mFrameOut

private mFrameOut:String = DEFAULT_FRAME_OUT
(read)

mFrameOver

private mFrameOver:String = DEFAULT_FRAME_OVER
(read)

mFrameUp

private mFrameUp:String = DEFAULT_FRAME_UP
(read)

upFrame

private upFrame:Number
(read)

Instance methods

checkAnimation

private function checkAnimation (
) : Void

Check status of animation on enterFrame.

stopAnimation

private function stopAnimation (
) : Void

Stop enterFrame handling.

toString

function toString (
) : String

Event handlers

onLoad

function onLoad (
) : Void

onRollOut

function onRollOut (
) : Void

Rollout handler.

onRollOver

function onRollOver (
) : Void

Rollover handler.