Constructor
(package) new Flicker(obj)
Creates a new Flicker object.
Parameters:
Name | Type | Description |
---|---|---|
obj |
rune.display.DisplayObject | The display object to which the subsystem is connected. |
- Source:
Members
(readonly) active :boolean
Whether the flicker effect is active (true) or not (false).
Type:
- boolean
- Source:
(readonly) visible :boolean
Whether the flicker effect is in a visible (true) or invisible (false) state.
A display object can be visible but made invisible due to the flicker
effect. Use this property together with the display object's visible
property to check whether the object is rendered or not.
Type:
- boolean
- Source:
Methods
start(durationopt, frequencyopt, onCompleteopt, scopeopt) → {undefined}
Starts the flicker effect with a predetermined intensity and duration. The
effect can be terminated prematurely via the stop method.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
duration |
number |
<optional> |
3000 | Duration in milliseconds. |
frequency |
number |
<optional> |
64 | Intensity; a low frequency is high intensity and vice versa. |
onComplete |
function |
<optional> |
Callback method. | |
scope |
Object |
<optional> |
Scope of callback method. |
- Source:
Returns:
- Type
- undefined
stop(execopt) → {undefined}
Stops ongoing flicker effect.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
exec |
boolean |
<optional> |
false | Whether the callback method should be executed as a consequence of stopping the flicker effect. |
- Source:
Returns:
- Type
- undefined