Magic 8 Ball says: “You’re on your own.”

Code that results in an error message

I don’t really understand how to fix this bug. I was trying to use recursion, but I don’t think I did it correctly.

I enjoy assignments like the one I had today. Why? Because it gives me an opportunity to have a ton of fun with snippy comments, allowing the computer to be the one to blame. Our assignment was to create a magic 8 ball program that would answer a question with one of five different answers. We had a sample magic 8 ball Flash program to model after, and so I tried to model the best I could.

Then I fell into problems. Not too big, a few of them were difficult to solve but more of them were not. I had to remember how to define each var and how to call upon them. I became close with a lot of commands such as “.text”. I also became a fan of obnoxiously bright colors for buttons. However, some problems did take me longer than I would like to admit to figure out and I had to stop with still one issue unsolved.

Character section of Text

Took me so long to figure out how to fix this. Please don’t judge. Honestly, the alpha percentage was the last thing I thought that could be wrong.

So the biggest issue I think was caused by someone else using my work space. Okay, okay, so that’s a bit territorial seeing as these are computers that other students use, but when I opened Flash there were a few things I had done that had been changed. I noticed three different changes that were not that way on Monday. First thing I noticed was the “permit debugging” option in the publish settings was turned off. I know it had been turned on before since my Professor had helped me figure that out. Second, for some reason my preview of my magic 8 ball was opening in a Firefox window, rendering trace commands useless. Thankfully, I had a friend in the class help me figure out how to fix that. Third, something that took me much longer to figure out than I care to admit, someone turned the alpha on the text color down to 0%. It took me a good while to figure out why the text wasn’t showing up.  At the place I ended, I managed to get the program to generate a number as soon as the “ask” button was clicked. On that, the two bits of dialog would appear at the bottom and the random number would then go through a series of “if-else” statements to find the answer that matched the number. That response would be returned. I then had it where the “ask” button would vanish and a “restart” button would appear. While the person could go through and press the restart button and start again, for some reason after the second time I got an error message that I couldn’t debug. I’m not sure how to fix it. Any ideas?