Package | org.wiiflash.utils |
Class | public final class HistoryPeakDetection |
Implements | flash.events.IEventDispatcher |
historyMultiplier
.
Also the current value can be interpolated using valueCount
greater than
one. If this is the case the current value is the average of given values. This average
value will be put into the history afterwards.
Method | Defined by | ||
---|---|---|---|
HistoryPeakDetection(valueCount:int = 2, historyCount:int = 32, historyMultiplier:Number = 16)
Creates a new HistoryPeakDetection object.
| HistoryPeakDetection | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with a HistoryPeakDetection object so that the listener receives notification of an event.
| HistoryPeakDetection | ||
addValue(value:Number):Boolean
Adds a value to the HistoryPeakDetection object.
| HistoryPeakDetection | ||
dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
| HistoryPeakDetection | ||
hasEventListener(type:String):Boolean
Checks whether the HistoryPeakDetection object has any listeners registered for a specific type of event.
| HistoryPeakDetection | ||
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the HistoryPeakDetection object.
| HistoryPeakDetection | ||
toString():String
Returns the string representation of the specified object.
| HistoryPeakDetection | ||
willTrigger(type:String):Boolean
Checks whether an event listener is registered with this HistoryPeakDetection object or any of its ancestors for the specified event type.
| HistoryPeakDetection |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when a peak has been detected. | HistoryPeakDetection |
HistoryPeakDetection | () | constructor |
public function HistoryPeakDetection(valueCount:int = 2, historyCount:int = 32, historyMultiplier:Number = 16)
Creates a new HistoryPeakDetection object.
ParametersvalueCount:int (default = 2 ) — Number of values that build current value.
|
|
historyCount:int (default = 32 ) — Number of values that are stored in the history.
|
|
historyMultiplier:Number (default = 16 ) — Multiplier for average value of history.
|
addEventListener | () | method |
public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with a HistoryPeakDetection object so that the listener receives notification of an event.
Parameterstype:String — The type of event.
|
|
listener:Function — The listener function that processes the event.
|
|
useCapture:Boolean (default = false ) — Determines whether the listener works in the capture phase or the target and bubbling phases.
|
|
priority:int (default = 0 ) — The priority level of the event listener.
|
|
useWeakReference:Boolean (default = false ) — Determines whether the reference to the listener is strong or weak.
|
See also
addValue | () | method |
public function addValue(value:Number):Boolean
Adds a value to the HistoryPeakDetection object. Whenever a value is added the check to detect a peak is done.
Parametersvalue:Number — The new value.
|
Boolean — true if peak has been detected; false otherwise.
|
dispatchEvent | () | method |
public function dispatchEvent(event:Event):Boolean
Dispatches an event into the event flow.
Parametersevent:Event — The Event object dispatched into the event flow.
|
Boolean |
See also
hasEventListener | () | method |
public function hasEventListener(type:String):Boolean
Checks whether the HistoryPeakDetection object has any listeners registered for a specific type of event.
Parameterstype:String — The type of event.
|
Boolean — A value of true if a listener of the specified type is registered; false otherwise.
|
See also
removeEventListener | () | method |
public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the HistoryPeakDetection object.
Parameterstype:String — The type of event.
|
|
listener:Function — The listener object to remove.
|
|
useCapture:Boolean (default = false ) — Specifies whether the listener was registered for the capture phase or the target and bubbling phases.
|
See also
toString | () | method |
public function toString():String
Returns the string representation of the specified object.
ReturnsString — A string representation of the object.
|
willTrigger | () | method |
public function willTrigger(type:String):Boolean
Checks whether an event listener is registered with this HistoryPeakDetection object or any of its ancestors for the specified event type.
Parameterstype:String — The type of event.
|
Boolean — A value of true if a listener of the specified type will be triggered; false otherwise.
|
See also
peak | event |