77jneedle


Letter Madness

Posted in Uncategorized by 77jneedle on October 25, 2012
Tags: ,

See how the output box displays the entire range of numbers the letterCount goes through?

Initially, this assignment was relatively easy to understand until I got to dealing with the for loop. I’m still not entirely confident on creating a for loop on my own, but I know if I just practice it a bit more I’ll get the hang of it. One of the problems I ran into at first is for some reason after I created my for loop in my original coding file, the loop would not execute. Perhaps there was some extra code that I didn’t notice from my previous attempts to try a count the number of instances of each letter (and trust me, I tried multiple approaches before I got to the for loop). So I just decided to restart from scratch and created an entirely new .as file for the assignment. And one other problem I ran into at the very end had to do with the letterCount. The number of instances of each letter was correctly displayed the first time clicked, but once a second letter was clicked it just gave me the total number of instances of both  letters. This ended up being because I needed to set the letterCount to zero after the loop was executed. One thing I don’t really understand is when the letterCount is displayed in the output box, it displays every single number from 1 to however many instances the letter has. Why does it only display on the swf file the total number?