MACROMEDIA DIRECTOR MX-USING DIRECTOR MX Use Manual page 318

Table of Contents

Advertisement

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 would increment the year displayed within
the Calendar control:
sprite(2).NextYear()
For the same Calendar control, the following Lingo code would decrement the year displayed by
the Calendar control:
sprite(2).PrevYear()
Parameters passed to the ActiveX control are automatically converted from their Director data
types to equivalent ActiveX data types. Likewise, the return value is automatically converted from
an ActiveX data type to an equivalent Director data type.
Using ActiveX control events
Each ActiveX control typically generates a variety of events. For example, a button ActiveX
control may generate a
may generate a
dateChanged
converts any event generated by the ActiveX control to a sprite event that it can handle. A list of
the control's events appears in the Events tab of the ActiveX Control Properties window.
To respond to an event generated by the ActiveX control, you must write an event handler to
capture the event. You can place these event handlers in movie scripts, sprite behaviors, scripts
assigned to cast members, or frame behaviors. However, you normally place the handler in the
behavior attached to the sprite for the ActiveX control.
As an example, if the Microsoft Access Calendar control is inserted into a Director movie as
a sprite on the score, the following Lingo code would capture the
Calendar control:
on click
-- Do something interesting here.
beep 2
end
A sprite behavior is a good location for this handler.
318
Chapter 11
event when the button is pressed, and a calendar ActiveX control
click
event when the date within the calendar is changed. Director
event from the
click

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director mx

Table of Contents