We begin we a preassembled Director movie:
We are first going to create a loop the frame script:
on exitFrame go the frame end
This frame script tells Director to keep playing the same frame.
Now We will create some markers
As we have mentioned in above Director allows you to mark certain frames in your movie so they can be identified by buttons and links.
on mouseUp go to next endThe go to next command tells Director to go to the next consecutive marker in the score.
on mouseUp go to previous endThe go to previous command tells Director to go to the previous marker in the score.
Now We will create some sprite scripts:
Sometimes a button will behave one way in one part of the movie and another way in a different part of the movie. That's when we use sprite scripts.
Using the Behaviour Inspector (Fig. 3.20):
Another way to write a sprite script - using the Behaviour Inspector.
Macromedia Director Behaviour Inspector Window
You may realise that we now have 2 scripts attached to a single object - a cast member script as well as a sprite script. Sprite scripts take priority over cast member scripts so in our case the cast member script will be ignored.
Using Lingo play/ play do to record actions:
Sometimes you may want only part an image to be linked instead of the whole object. That's when we use invisible buttons. Invisible buttons aren't magical objects, they are just shape cast members with an invisible border.
We used a different command for the above scripts. The play command is similar to the go to command but with play,
on mouseUp play done end
You can see the completed example in lingo_ex3.2.dir