Package | ardisia.components.clocks |
Class | public class ClockAnalog |
Inheritance | ClockAnalog ClockBase spark.components.Group |
View the technical documentation on the Ardisia Labs website for more information.
Default MXML PropertymxmlContent
Property | Defined By | ||
---|---|---|---|
animated : Boolean
Set to true to animate the secondNeedle. | ClockAnalog | ||
animationDuration : Number
The duration in milliseconds for secondsNeedle animations. | ClockAnalog | ||
centerPin : Ellipse
The center pin. | ClockAnalog | ||
easer : IEaser
An IEaser to use with secondsNeedle animations. | ClockAnalog | ||
hoursNeedle : Rect
Needle to display the hours. | ClockAnalog | ||
isRunning : Boolean [read-only]
Returns true when the clock is running. | ClockBase | ||
minutesNeedle : Rect
Needle to display the minutes. | ClockAnalog | ||
secondsNeedle : Rect
Needle to display the seconds. | ClockAnalog | ||
updateInterval : Number
The interval in milliseconds between clock updates. | ClockBase | ||
use24HourMode : Boolean
Set to true to display a clock using a 24 hour format. | ClockBase | ||
useUTC : Boolean
Set to true to display UTC time, rather than local time. | ClockBase | ||
utcOffsetHours : Number
The hours to offset from UTC for display. | ClockBase | ||
utcOffsetMinutes : Number
The minutes to offset from UTC for display. | ClockBase |
Method | Defined By | ||
---|---|---|---|
dispose():void [override]
Call to remove the component from the display list and remove any
event listeners. | ClockAnalog | ||
start():void
Start the clock. | ClockBase | ||
stop():void
Stop the clock. | ClockBase | ||
update():void [override]
Call to update the clock to reflect the current time. | ClockAnalog |
Method | Defined By | ||
---|---|---|---|
calcNeedleAngles():void
Calculate the angles at which to display the needles. | ClockAnalog | ||
getEllipseRadius(w:Number, h:Number, theta:Number):Number
Returns the radius of the ellipse from the center to the given point
on the ellipse perimeter at a given angle. | ClockAnalog | ||
setupLabelInstances():void
Initialize the labels. | ClockAnalog | ||
timerHandler(event:TimerEvent):void
Handles events from the timer. | ClockBase |
animated | property |
animated:Boolean
Set to true to animate the secondNeedle.
The default value is true
.
public function get animated():Boolean
public function set animated(value:Boolean):void
animationDuration | property |
animationDuration:Number
The duration in milliseconds for secondsNeedle animations. Only relevant if the "animate" property is true.
If greater than the "updateInterval" will be adjusted down to the "updateInterval".
The default value is 1000
.
public function get animationDuration():Number
public function set animationDuration(value:Number):void
centerPin | property |
public var centerPin:Ellipse
The center pin.
The default value is Ellipse
.
easer | property |
easer:IEaser
An IEaser to use with secondsNeedle animations. Only relevant if the "animate" property is true.
Defaults to a Elastic easer.
The default value is spark.effects.easing.Elastic
.
public function get easer():IEaser
public function set easer(value:IEaser):void
hoursNeedle | property |
public var hoursNeedle:Rect
Needle to display the hours.
The default value is Rect
.
minutesNeedle | property |
public var minutesNeedle:Rect
Needle to display the minutes.
The default value is Rect
.
secondsNeedle | property |
public var secondsNeedle:Rect
Needle to display the seconds.
The default value is Rect
.
calcNeedleAngles | () | method |
protected function calcNeedleAngles():void
Calculate the angles at which to display the needles.
dispose | () | method |
override public function dispose():void
Call to remove the component from the display list and remove any event listeners.
getEllipseRadius | () | method |
protected function getEllipseRadius(w:Number, h:Number, theta:Number):Number
Returns the radius of the ellipse from the center to the given point on the ellipse perimeter at a given angle.
Derived from the ellipse equation - see http://en.wikipedia.org/wiki/Ellipse
Parameters
w:Number — the width of the ellipse
| |
h:Number — the height of the ellipse
| |
theta:Number — the angle at which the radius is to be computed
|
Number — the radius in pixels
|
setupLabelInstances | () | method |
protected function setupLabelInstances():void
Initialize the labels.
update | () | method |
override public function update():void
Call to update the clock to reflect the current time.