FMXISRoundDialSmooth

Availability

Flash Player 6 r65.

Description

This class is an extension of FMXISRoundDial that provides round dial functionality with a rate-limited needle (based on a user-specified needle rate). Developers can set its value in two ways. First, by setting the val property to have the dial jump immediately to that value. Second, by setting the targVal property, the dial will reach the target value based on the set needle rate (needleRate). For convenience, the gauge generates an event, onReachTarg when it reaches the target value (only if set using targVal). The event name can be changed (if desired) in the component property inspector, on initialization through the initObject of attachMovie(), or programmatically through the respective property.

To simulate the smooth needle movement, this component updates the needle approximately every 1/20th of a second (note: because it uses Flash's setInterval() this interval can be up to twice as slow if the frame rate is set around 20 fps, due to "features" of the setInterval implementation). Therefore, if you have more than a few of these components on the stage, you may find that it slows down other processes. If you need many of these on the Stage at once, you might consider rewriting this to centralize the needle update and need for all the timers.

The component provides properties to bring in attached graphics based on movie clip linkage ID's. This allows the developer to have multiple instances on the Stage with different looks. Developers using the component FLA's can change the appearance of the hand by modifying: defRndDialHand, center of the dial by modifying: defRndDialCenter, the background graphic by modifying: defRndDialBkgnd.

Showing the dial center and background are optional.

Code Hinting

The suffix of variables recognized for codehinting purposes as FMXISRoundDialSmooth's is _rdialSmooth.