DANumber Class

Creates a DANumber object that represents an animated number. This means the value of the object can vary over time.

This class inherits from the DABehavior class.

For relevant functions and properties from the DAStatics class, see the following topics.

DANumber Functions

AnimatePropertyEnables control properties to be animated (vary over time).
ExtractExtracts the value of numberObj, returning a number (a double).
ToStringConverts a DANumber object to a DAString object with the specified number of digits after the decimal point. The number of digits after the decimal point is specified by a double.
ToStringAnimConverts a DANumber object to a DAString object with the specified number of digits after the decimal point. The number of digits after the decimal point is specified by a DANumber object and can be animated.

AnimateProperty

DANumber Class

Enables control properties to be animated (vary over time).

Syntax

numberObj.AnimateProperty( property, language, invoke, update )

Parameters

property
String that is either the name of the property to animate or the name of a scripting function to invoke that will set the property.
language
String that is name of the scripting language.
invoke
Boolean value that determines if the property is set directly or if a function is invoked. If FALSE, the property is set directly. If TRUE, a function is invoked.
update
A double value specifying how frequently the property is updated.

Return Value

Returns the DANumber object.

Example

This function forms fragments of script and passes them to the scripting engine on every frame. For example, a DANumber object can be attached to the width property of a frame on an HTML page. When the invoke parameter is FALSE, the property is set directly as shown in this fragment from the JScript sample in JScript\Exercises\AnimatedGlow.html:

glow.AnimateProperty("DAControl.Filter[0].strength", "JScript", false, .08));

If the invoke parameter is TRUE, then a function name should be specified in the string parameter (property) and is invoked as shown in this fragment from the JScript sample in JScript\Templates\AnimatedProperties.html:

filterMethod = getNumber().AnimateProperty("SetFilter", "JScript", true, .1);

See Also

AnimateControlPositionPixel

Extract

DANumber Class

Extracts the value of numberObj, returning a number (a double). The object must have a constant value.

Syntax

numberObj.Extract()

Return Value

Returns a number (a double).

ToString

DANumber Class

Converts a DANumber object to a DAString object with the specified number of digits after the decimal point. The number of digits after the decimal point is specified by a double.

Syntax

numberObj.ToString( a )

Parameters

a
The double value representing the number of digits to use after the decimal point.

Return Value

Returns the DAString object.

ToStringAnim

DANumber Class

Converts a DANumber object to a DAString object with the specified number of digits after the decimal point. The number of digits after the decimal point is specified by a DANumber object and can be an animated number.

Syntax

numberObj.ToStringAnim( a )

Parameters

a
DANumber object representing the number of digits to use after the decimal point.

Return Value

Returns the DAString object.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.