DirectAnimation Animated Header --DANumber Class DirectAnimation Animated Header --DANumber Class* Microsoft DirectAnimation SDK
*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

bullet1.gifAnimateProperty

bullet1.gifExtract

bullet1.gifToStringAnim

bullet1.gifToString


AnimateProperty

DANumber Class

Allows 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

AnimateControlPositionPixel


Extract

DANumber Class

Extracts 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).


ToStringAnim

DANumber Class

Converts 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.


ToString

DANumber Class

Converts 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.Abs(a)

lib.Acos(a)

lib.Add(a, b)

lib.Asin(a)

lib.Atan(a)

lib.Atan2(a, b)

lib.Ceiling(a)

lib.Cos(a)

lib.DANumber(a)

lib.Derivative(a)

lib.Div(a, b)

lib.EQ(a, b)

lib.Exp(a)

lib.Floor(a)

lib.GT(a, b)

lib.GTE(a, b)

lib.Integral(a)

lib.InterpolateAnim(from, to, duration)

lib.Interpolate(from, to, duration)

lib.Ln(a)

lib.Log10(a)

lib.LT(a, b)

lib.LTE(a, b)

lib.Mod(a, b)

lib.Mul(a, b)

lib.NE(a, b)

lib.Neg(a)

lib.NumberBSpline(degree, knots, control_elements, weights, evaluation)

lib.Pow(a, b)

lib.Round(a)

lib.SeededRandom(seed)

lib.Sin(a)

lib.SlowInSlowOut(from, to, duration, acceleration)

lib.SlowInSlowOutAnim(from, to, duration, acceleration)

lib.Sqrt(a)

lib.Sub(a, b)

lib.Tan(a)

lib.ToDegrees(a)

lib.ToRadians(a)

Relevant Properties from the DAStatics Class

The following properties are defined in the DAStatics class and are most relevant for objects of type DANumber.

lib.GlobalTime

lib.LocalTime

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page