Here's lecture:
When you embark on a programming project it can be difficult to sort out your ideas. Something as simple as "I want to make a tic-tac-toe game" can involve hundreds of steps. Breaking down your idea into many mini-steps is challenging (but you must do it). I have a question that you can ask yourself as a way to help break down the task at hand: What do you want to do, and when do you want to do it? For example, "when the user clicks the box, make the box move to the right". In fact, you can break it down further--think about the "what" and the "when". In this case, the what is "move the box to the right". The when is "when the user clicks".
We'll begin by focusing on the "what". Common tasks include changing the appearance of a particular Movie Clip instance on stage like "move the box" or "change the transparency (alpha) of the circle". You could also change the contents of a TextField. Make the text field read "You have 2 minutes remaining". These are all "whats".
We'll quickly move to defining the "whens" (as in "when the user clicks" or "when the sound has completed"). You can't create anything very interesting without specifying both the what and the when. Setting up code that responds to various events (such as "when" the mouse is clicked) involves a bit more code, but that doesn't mean you can't clearly specify what you want to do (and when you want it done).
I keep saying "what do you want to do and when do you want to do it?" and I think it's worth always coming back to. If it helps (and doesn't scare you from ActionScript) think of the old horror movie "I saw what you did (and I know who you are)". There is one tiny thing--I think it's more intuitive and logical to think "when this event happens, I want this thing to happen". So, the order is swapped. There's no problem stating your intentions in any order you wish. Really, the only goal here is to remind you to specify everything. Your code must contain a level of detail that leaves out nothing. That is, Flash won't figure out what you really wanted--you have to say exactly. Many students are surprised at the level of detail necessary. It's as if you're getting slowed down and forced to think of details your mind glosses over. But when a good programmer is in the zone, it's as though time has slowed down and everything moves in super slow motion. You step through each micro-task and make it work before going on to the next step. Sometimes you can briefly step out of this mode to look at many things at once. Just try not to be impatient because you are going to have to write the instructions for every last detail.
LOL!!!
jbone10299 2 years ago