EasyManua.ls Logo

MACROMEDIA DIRECTOR MX-USING DIRECTOR MX - Page 8

MACROMEDIA DIRECTOR MX-USING DIRECTOR MX
624 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Contents8
CHAPTER 14
Behaviors
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Attaching behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Changing the order of attached behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Getting information about behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Creating and modifying behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
Writing behaviors with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Setting up a Parameters dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Setting behavior properties with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Customizing a behaviors property. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Creating an on getPropertyDescriptionList handler. . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Including a description for the Behavior inspector. . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
Example of a complete behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Sending messages to behaviors attached to sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Using inheritance in behaviors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
CHAPTER 15
Navigation and User Interaction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Creating basic navigation controls with behaviors . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Adding push buttons, radio buttons, and check boxes . . . . . . . . . . . . . . . . . . . . . . . . . 374
Jumping to locations with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Detecting mouse clicks with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Making sprites editable and draggable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Making sprites editable or moveable with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Checking which text is under the pointer with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . 379
Responding to rollovers with Lingo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Finding mouse pointer locations with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Checking keys with Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Equivalent cross-platform keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Identifying keys on different keyboards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
About animated color cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Creating an animated color cursor cast member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
Using an animated color cursor in a movie . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
CHAPTER 16
Writing Scripts with Lingo
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Scripting basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385
Lingo terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Lingo syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
Writing Lingo statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Using handlers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Using lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
Expressing literal values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Using operators to manipulate values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
Controlling flow in scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
Creating and attaching scripts with the Script window . . . . . . . . . . . . . . . . . . . . . . . . 412
Using linked scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
Using parent scripts and child objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Troubleshooting Lingo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426

Table of Contents

Related product manuals