Index Topic Contents | |||
Previous Topic: DAMontage Class Next Topic: DAPair Class |
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.
- DANumber Functions
- Relevant Functions from the DAStatics Class
- Relevant Properties from the DAStatics Class
DANumber Functions
DANumber Class
AnimatePropertyAllows control properties to be animated (vary over time). 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);numberObj.AnimateProperty(
property,
language,
invoke,
update
)Parameters
- property
- A 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
- A string that is name of the scripting language.
- invoke
- A boolean 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 specifying how frequently the position is updated.
Return Values
Returns the DANumber object.
See Also
DANumber Class
ExtractExtracts the value of numberObj, returning a number (a double). The object must have a constant value.
numberObj.Extract
Return Values
Returns a number (a double).
DANumber Class
ToStringAnimConverts a DANumber object to a DAString object.
numberObj.ToStringAnim(
a
)Parameters
- a
- The DANumber object representing the number of digits to use after the decimal point. This must be an animated number.
Return Values
Returns the DAString object.
DANumber Class
ToStringConverts a double to a DAString.
numberObj.ToString(
a
)Parameters
- a
- The double representing the number of digits to use after the decimal point.
Return Values
Returns the DAString object.
Relevant Functions from the DAStatics Class
The following functions are defined in the DAStatics class and are most relevant for objects of type DANumber.
lib.InterpolateAnim(from, to, duration)
lib.Interpolate(from, to, duration)
lib.NumberBSpline(degree, knots, control_elements, weights, evaluation)
lib.SlowInSlowOut(from, to, duration, acceleration)
lib.SlowInSlowOutAnim(from, to, duration, acceleration)
Relevant Properties from the DAStatics Class
The following properties are defined in the DAStatics class and are most relevant for objects of type DANumber.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.