I am starting a butterfly program and having an issue and really just barely have it started and would like to get some help\feedback on how to do this. The following is the instructions and I will make a second post on what code I have so far...
The butterfly is going to be moving from side to side in a slightly upward
assent when the animation starts. You need to build a set of controls that
allow the user to control whether the butterfly ascends (up) or descends
(down) and also allows the direction of the butterfly to change (left or
right). The best way to implement this feature is through the use of
keystrokes that when pressed act to control the direction of the butterfly.
Whether you implement this feature through keystrokes or controls, make
sure that the feature is communicated to the user.
Butterflies fly by opening and closing their wings. So it is expected that
the butterfly will alternate between opened and closed as it wings its way
across the form. If the butterfly is moving right, make certain the butterfly
graphic displayed shows the butterfly as moving toward the right. If the
butterfly is moving to the left, make certain the butterfly graphic displayed
shows the butterfly as moving toward the left.
If the butterfly reaches the top of the form in its assent, it should wrap
around to the bottom of the form. If the butterfly reaches the bottom of the
form in its descent, it should wrap around to the top of the form.
If
If the butterfly reaches the left edge of the form, it should begin flying
toward the right side of the form. If the butterfly reaches the right edge of
the form, it should begin flying toward the left side of the form. If the user
changes the direction of the butterfly, insure that the correct graphics are
used in relation to the direction of the butterfly and that the butterfly moves
in the indicated direction. Please note that when the butterfly reaches the
edge of the form, the butterfly must change direction regardless of any
user input.