Scripting Reference Introduction


The Scripting Reference contains information about each of the DirectAnimation functions. This information includes syntax, returned values, and descriptive information. The reference is organized by classes. For example, there is a section on the DAImage class. At the end of each section, there is a list of functions that, while relevant to that particular class, are included in the DAStatics library. This library is very large, and it may be easier to familiarize yourself with its contents by looking at specific classes and seeing what DAStatics functions are pertinent. When parameters are described as animated numbers, this means they must be of type DANumber, not that they must necessarily change over time.

Differences between VBScript and JScript

Syntax and terminology are based on VBScript conventions. However, there are only a few simple differences between that and JScript. Those differences that pertain directly to DirectAnimation are:


// This is VBScript
Set myPt = CreateObject("DirectAnimation.DAPoint2")

// This is JScript
myPt = new ActiveXObject("DirectAnimation.DAPoint2");

The PixelLibrary and the MeterLibrary

The MeterLibrary and the PixelLibrary set the unit of measurement to meters or pixels respectively. Both return the DAStatics object, so, to gain access to that library, one of these libraries must be chosen. There are two important differences between the libraries (other than the obvious one of different units of measurement). They are:

The Visual Basic Object Browser

If you have access to Visual Basic, the object browser is an excellent way to see the objects, properties and methods in the DirectAnimation library. To use the object browser, follow these steps:

  1. Install DirectAnimation.
  2. In Visual Basic, select Standard.EXE at the opening dialog.
  3. Choose Components from the Project menu. A Components dialog box appears.
  4. On the Controls tab, select DirectAnimation Library.
  5. The DirectAnimation control will appear as a choice in the Toolbox.
  6. Double-click on the control. A control will appear on the form.
  7. Select Object Browser from the View menu. The Object Browser will appear.
  8. At the top-left of the Object Browser (where it says All Libraries), choose DirectAnimationCtrl from the dropdown list.
  9. Click on a class to display its functions, subroutines, and properties.
  10. Click on a function, subroutine, or property to display its syntax (shown at the bottom of the Object Browser.

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