Using Flash and Other Interactive Media Types
317
Setting ActiveX control properties
An ActiveX control describes its information using properties—named characteristics or values
such as color, text, font, and so on. Properties can include not only visual aspects but also
behavioral ones. For example, a button might have a property that indicates whether the button is
momentary or push-on/push-off. An ActiveX control’s properties define its state—some or all of
which properties may persist. Although the control can change its own properties, it is also
possible that the container holding the control might change a property, in response to which the
control would change its state, user interface, and so on.
When an ActiveX control is inserted into a Director movie, the properties that the control exposes
can be viewed and edited by clicking the Properties tab of the Control Properties dialog box for
the ActiveX Xtra. Each property exported by the ActiveX control is identified along with the
current value of the property. The user edits a property value by simply clicking over the existing
value with the mouse. For most properties, such as numeric or string values, the new value can be
directly entered into the list using the keyboard.
In Director, all properties that an ActiveX control exports are properties of the corresponding
sprite. This is the generic Lingo syntax for setting an ActiveX control property:
sprite(X).propertyName = value
The generic Lingo syntax for getting an ActiveX control property is as follows:
value = sprite(X).propertyName
As an example, if the Microsoft Access Calendar control is inserted into a Director movie as the
second sprite on the score, the following Lingo code sets the Year property of the Calendar control
to a specific year:
sprite(2).year = 1995
To get the Year property from the same Calendar control and place it into a Lingo variable named
CalendarYear
, you can use the following Lingo code:
CalendarYear = sprite(2).year
Some ActiveX control properties are read-only, and trying to set a property for such a control will
cause an error in Director. For more information, see the documentation for the ActiveX control
you are using.
Using ActiveX control methods
An ActiveX control describes its functionality using methods. Methods are simply functions
implemented in the control that Director can call to perform some action. For example, an edit or
other text-oriented control supports methods that let Director retrieve or modify the current text,
perhaps performing such operations as copy and paste.
When you insert an ActiveX control in a Director movie, you can view the methods exposed by
the control by clicking the Methods tab of the Control Properties dialog box for the ActiveX
control. The dialog box displays each method supported by the ActiveX control and a description
of the parameters for each method.
In Director, all methods that an ActiveX control supports are functions for the corresponding
sprite. The generic Lingo syntax for calling an ActiveX control method is as follows:
ReturnValue = sprite(N).MethodName(param1, param2, ...)
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...