RollOverWatcher
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Author: | Arthur Clemens |
| Classpath: | org.asapframework.util.watch.RollOverWatcher |
| File last modified: | Thursday, 12 October 2006, 11:19:40 |
Checks the mouse location for movement. If the mouse has not moved in the set time period, a fallback function is called, allowing for instance a buttonclip to perform a rollout.
This class is useful to 'catch' the mouse if it has disappeared from the edge of the Flash stage. If this happens fast, or if the Flash movie is occupied, the movieclips don't receive any more mouse events, and stick to their current state. A RollOverWatcher object equals a out-of-stage mouse to a still mouse.
This class is useful to 'catch' the mouse if it has disappeared from the edge of the Flash stage. If this happens fast, or if the Flash movie is occupied, the movieclips don't receive any more mouse events, and stick to their current state. A RollOverWatcher object equals a out-of-stage mouse to a still mouse.
Summary
Constructor
- RollOverWatcher (inFallbackFunctionOwner:Object, inFallbackFunctionName:String, inIntervalDuration:Number)
- Calls method 'inCallerFallbackFunctionName' of object 'inCaller' when mouse inIntervalDuration in seconds Parameters that should be passed to the fallbackFunction can be added as a comma separated list after the 3 constructor parameters.
Instance properties
- mLoc : Object
- mInterval : Number
- mIntervalDuration : Number
- mFallbackFunctionOwner : Object
- mFallbackFunctionName : String
- mFallbackFunctionParams : Array
- mFPulse : FramePulse
Instance methods
- stop : Void
- setLocInterval : Void
- timerRing : Void
- startOnEnterFrame : Void
- stopOnEnterFrame : Void
Event handlers
- onEnterFrame : Void
- Updates mLoc and resets the time interval if the mouse has moved.
Constructor
RollOverWatcher
function RollOverWatcher (
inFallbackFunctionOwner:Object,
inFallbackFunctionName:String,
inIntervalDuration:Number)
Calls method 'inCallerFallbackFunctionName' of object 'inCaller' when mouse
inIntervalDuration in seconds
Parameters that should be passed to the fallbackFunction can be added as a
comma separated list after the 3 constructor parameters.
inIntervalDuration in seconds
Parameters that should be passed to the fallbackFunction can be added as a
comma separated list after the 3 constructor parameters.
Instance properties
mFallbackFunctionName
private mFallbackFunctionName:String
(read)
mFallbackFunctionOwner
private mFallbackFunctionOwner:Object
(read)
mFallbackFunctionParams
private mFallbackFunctionParams:Array
(read)
mFPulse
mInterval
private mInterval:Number
(read)
mIntervalDuration
private mIntervalDuration:Number
(read)
mLoc
private mLoc:Object
(read)
Instance methods
setLocInterval
private function setLocInterval (
) : Void
startOnEnterFrame
private function startOnEnterFrame (
) : Void
stop
function stop (
) : Void
stopOnEnterFrame
private function stopOnEnterFrame (
) : Void
timerRing
private function timerRing (
) : Void
Event handlers
onEnterFrame
private function onEnterFrame (
) : Void
Updates mLoc and resets the time interval if the mouse has moved.