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.
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
Constructor
Class properties
- DEFAULT_FRAME_ON : String
- DEFAULT_FRAME_UP : String
- DEFAULT_FRAME_OVER : String
- DEFAULT_FRAME_OUT : String
Instance properties
- mFrameOn : String
- mFrameUp : String
- mFrameOver : String
- mFrameOut : String
- direction : Number
- hilightFrame : Number
- upFrame : Number
- isAnimating : Boolean
- doOutAnimation : Boolean
Instance properties inherited from EventButton
Instance properties inherited from EventMovieClip
Instance methods
- stopAnimation : Void
- Stop enterFrame handling.
- checkAnimation : Void
- Check status of animation on enterFrame.
- toString : String
Instance methods inherited from EventButton
Event handlers
- onLoad : Void
- onRollOver : Void
- Rollover handler.
- onRollOut : Void
- Rollout handler.
Event handlers inherited from EventButton
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.
Event handlers
onLoad
function onLoad (
) : Void