HilightButton
| Kind of class: | class |
|---|---|
| Inherits from: | EventButton < EventMovieClip < MovieClip |
| Classpath: | org.asapframework.ui.buttons.HilightButton |
| File last modified: | Sunday, 08 October 2006, 23:37:38 |
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 continues all the way until the "on" frame, and then continues further until the end. So a short move over a clip that has this class, results in a full hilight of the clip.
If the clip has an intro for first display, the "up" frame will not be at the first frame. In order for the clip to move back to the "up" label when it has reached the end, an extra frame script must be added in the last frame: "gotoAndStop("up");".
Summary
Constructor
Instance properties
Instance properties inherited from EventButton
Instance properties inherited from EventMovieClip
Instance methods
Instance methods inherited from EventButton
Event handlers
Event handlers inherited from EventButton
Constructor
HilightButton
function HilightButton (
)
Instance properties
isLit
isLit:Boolean
(read)
True if the current frame is the hilight frame
Instance methods
hilight
function hilight (
) : Void
Go directly to the hilight frame.
unHilight
function unHilight (
) : Void
Go directly to the "up" frame
Event handlers
onRollOut
function onRollOut (
) : Void
Handle rollout event.
Can also be used to animate out of the hilight state.
Can also be used to animate out of the hilight state.
Overrides:
onRollOver
function onRollOver (
) : Void
Handle rollover event.
Can also be used to animate to the hilight state.
Can also be used to animate to the hilight state.
Overrides: