A M A N D A H O S T A L K A
FINAL PROJECT: Fly Swatter Game
Grab the Swatter and Drag it; when you let go (MouseOff) it will whack a fly.
This was my most challenging problem to date. Unlike with the labs, I started from scratch with an all new project and copied and pasted things here and there, troubleshooting all the way.....I ran into a lot of issues. Nevertheless, I had some success I'll share here.
> Used a DOCUMENT CLASS and three class files (PlayAgainClass/fliesClass/swatterClass/spiderClass)
> Created the ARTWORK. (swatter, wallpaper & flyribbon). FlyRibbon and spiders are not interactive.
> At the start of the movie, there is a little "GRAB" graphic, that shows (briefly) where to grab the swatter for the most effective play. I tinkered with the registration point for the movieclip until I cold set it at the ideal spot.
> SOUND: added ambient sound(buzz) and interactive sound: boink. I had to solve the issue of the boink wanting to load over and over. I did this by making the callback offDrag, instead of SoundGood. Thus, the sound only plays when the mouse is released and the swatter, swats.
> GAMEOVER & SCORE: Functional Score mechanism; score also resets on PlayAgain. GameOver and PlayAgain actually work on this one; I never succeeded with that on Lab2 so I am particularly proud. It resets at 6 hits so you can enjoy this feature again and again!
> ANIMATION: There are fifteen flies that are set to be invisible. When one is killed another "appears. This is done in a very rudimentary way since we struggled with adding instances dynamically; this also resulted in an inability to have "unhit" flies land on the flyRibbon (as originally planned).
> However, the flies do animate to the "ground" when hit as if they just died; having some dead and some alive on the ground kinda works, because it is like some are just stunned--a similar effect to using a fly swatter.
> When you release the mouse, the swatter animates; if you hit something..it's directed to a different spot in the timeline for the "gotcha."
> There is a timer that is utilized so that the flies do not constantly animate. When they are not animating, they go to the bottom of the screen and sit; waiting for you to whack em.--just like real flies..sort of. Stuart helped me with this, but I then had to integrate it into my own project. I finally got it to work!