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

bullet1.gifToStringAnim


AnimateProperty

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 invoke is FALSE, the property is set directly and the fragment would look like:


this.is.the.propertyIWantToSet = whateverIWant

If invoke is TRUE, then a function name should be specifed in the string parameter (property) and is invoked this way:


myFunction(whateverIWant)

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

AnimateControlProperty


Extract

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


ToString

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.


ToStringAnim

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.

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.Interpolate(from, to, duration)

lib.InterpolateAnim(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

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