- Challenge Project
- Failing is Learning
- Success is a Menace
Estimated Work Time
- 20 Minutes
Consider this a challenge project! Before delving into the turorials on the following pages, I'd like you to try to move an enemy accross the stage as in the example below. You should be able to accomplish this if you've been following along with the tutorials.
It's OK, in fact, it's GREAT if you struggle with this challenge. If you fail, you learn. Think about it: When you've successfully completed the previous projects, have you gone back through each line of code to determine how or why you were successful?
Most people wouldn't. It's just part of human nature. When you succeed, it's because you're the best. There's no reason to go back through and analyze it. You're the best! But don't forget: Success is a menace; it fools smart people into thinking they can't lose.
When you fail.... well, that's when you learn! As you take on this challenge, and perhaps beat your head against the computer as you struggle through it, you'll be forced to analyze each statement of code to determine what it's doing, how it's working, or why it's failing. You'll learn.
Let me give you some hints about what you need to do:
- Create an enemy MovieClip
- Attach a single copy of enemy and set the x,y postion as part of the init function
- Create a moveEnemy function somewhat similar to the moveLaser function
- Call the moveEnemy function the same place you call the moveLaser function
You'll need to click the movie with your mouse, then use your keyboard to move and fire: