Captain Mal Would Have Fun With This MadLib (Hopefully)

The inside of the flash workspace

This is what my final mad lib looked like after the words were entered and the button was pressed. The current button is the reset button.

This weekend we had the assignment to create a mad lib program. A user would enter in at least four different types of words and then press a button that would generate it into the story and generate four words at random in different spots. I decided to have a little bit of fun with mine as I made it Firefly themed. The program itself wasn’t difficult, I learned long ago that the best way to code is to look at old codes that worked and reuse the same code but change what I need. Honestly, if I was asked to write down all the code by hand on a test I would probably fail. However, I have gotten relatively good at puzzling the pieces I know together to create something that works.

The color scheme was one that I felt matched the television show Firefly by Joss Whedon. It has a western feel to it, the buttons containing quotes from the characters of the show. The words were taken from a summary of Firefly from TV.com. I originally was going to make the title into dynamic text to give it an instance, but I couldn’t think of a good reason to do that. I didn’t need extra instances of the title, and so I didn’t create an instance for it and I didn’t call it. I guess I’m not really sure when calling something on start up of a flash program is better than just having it on the stage to begin with

Flash Interface

The early stages of the code. This was before the story was entered or anything else was entered really. It was setting up the button and getting things to work.

I didn’t have much difficulty with the code part. In fact, the most difficult part for me was figuring out the text and which words to remove. Remove the wrong word and the summary wouldn’t make sense with a word the user would enter. Another thing that confused me with arrays and strings was that when calling the number of the word and putting it in the summary, “.text” wasn’t needed for some reason. I guess I don’t quite understand that part either. Here is the link to my madlib.