ART279 - 3D Computer Graphics Design II
Spring 2002 - NVCC - Giulio Porta
|
This project required becoming familiar with the Flash ActionScript language. This assignment illustrates a simple mouse interaction of
a graphic following the mouse as it is moved. In addition, I used invisible buttons to trigger the
appearances of the apparitions and made the ghost cursor semi-transparent
when it's over the buttons. I also added a sound to the apparitions and
added some animation to most. |
I used free halloween clipart from Halloween Online to create this project. I modified most of the clipart to suit my needs using Adobe Photoshop. For the background image I merged and modified two clipart files, a haunted house and a graveyard. The blueghost was too pixelated to use so I re-colored him. The bluespook was part of a larger clipart file. I removed everything else but the bluespook and reshaped him slightly. The other clipart files I used unchanged. |
|
The instance of the ghost has some Actions associated with it . The following code has been generated using the Actions panel and following the tutorial instructions: ****************** This script executes when the movie is loaded. It attaches the Ghost image to the regular cursor using the startDrag property. onClipEvent(load) { Via the tutorial, I was able to make the appropriate entries in
the Action panel and this script was generated for me. Per the
tutorial, I specified GetProperty(_x,_y) in the Target field
and checked Lock Mouse to center box. |
I created 5 invisible buttons to handle the mouse click events that cause each apparition to appear and disappear. All the buttons exist on a single separate layer. The ActionScript for the buttons is below: Each button has this script with the highlighted "button name" different for each occurrence. (I gave each button the same name as the apparition layer name) **************** This script makes the movie clip (apparition) visible or invisible on a mouse click
on (release) { I used Expert mode in the Action panel to develop this script. I
needed to know the current state of the apparition's (movie clip) visibility (getProperty
_visible - returns a true or false) to determine which action to take,
on or off (setProperty _visible - set to true or false). |
Each movie clip (the 5 apparitions) exists on a separate layer and has the following Actionscript attached to it. **************** This script causes the Ghost Cursor to dim when over a button.
on (rollOver) { Again I used Expert mode and used the _alpha property to set the objects opacity. I reduced it to 25% when the ghost is over a button and it returns to 100% when it's not. |
Layers and Timeline |
|
The bluespook has one keyframe at the midway point and fades in and out. |
I also tried to make the regular cursor invisible
but, the semi-transparent ghost cursor event did not work properly. It
would briefly appear
|