Squeaky Clean

This assignment was both difficult and yet very eye-opening. I managed to try new coding combinations to get the sentences exactly how I wanted them. I have fallen in love with the “split()” and “join()” functions, and used them both to get exactly what I wanted. I have also become incredibly enchanted with the idea that one can write the name for the function, and then do a long list of things to that passage simply by adding “.” to the end of it. I ended up learning how clean these codes can look by having what would otherwise be lines and lines of messy code and is now simply one long line of code.

Flash Interface

This is my final for-loop code and the code above it to get the proper letter out based on the button pushed. I think it looks very clean. I like clean codes, they’re much easier to read.

The most difficult part was figuring out what needed and what didn’t need to be said in the code for the for loop. That took me a long time to figure out the syntax. I wish APIs were not done in such confusing language, but alas, I must learn how to speak like the reference guide. I’m excited though to start on the hangman game- I just hope I don’t get too caught up in design that I leave myself no time to actually work on the code!

I am trying to get the link to the public viewing of the final file, but unfortunately (It’s either my computer or Dropbox), Dropbox is being a little bit of a butt. There must be some system maintenance going on. I will link to my final letter madness flash creation once it starts working again or I can get on the computers in the communication lab.

 

Edit:

Here is the link to my final product.

Only Pushing Some Right Buttons

For this assignment we had to hook up seven different buttons, all that would do something different to the passage above. My final project is located here. I ran into a few problems with this assignment, and I’m not sure how to fix them and I couldn’t quite find a solution. Every time I tried to find one I would end up confused and the language of the text or websites that were offering help would be too high for me to quite understand at this point with all this technical jargon.

Flash Interface

This was the point where I decided to try and make it so the computer counted how many letters there were without spaces. “O” is the letter that was with spaces, “a” is the letter without spaces. I still don’t know how to make it change when the word “We” is replaced with “ponies”.

My first error that I couldn’t solve involves changing more than one instance of “we” into “ponies”. I was trying to think of the best and easiest way to do this, but I couldn’t think of it. I was contemplating a for-loop, but I still don’t quite understand the boundaries of a for-loop’s ability. The second error that I had, one that again I’m not completely sure if I’ve even diagnosed correctly, is the “find x Letter” command. I can get the correct letter to come out (if I remembered to change the number in the code back to 83 after trying my debugging tricks- if not I apologize!), minus the spaces. I turned it into an array, removed the spaces, then put it back into a string. I got the 83rd letter and then I realized it: That letter, nor does the character count change when changing “We” to “ponies”. 

I had to wonder for a bit what caused that problem. Is is the computer going back to the original passage and not acknowledging the previous changes? That’s what I thought, and still think, but I’m not sure how to fix that. How to make sure the computer knows to apply the changes to the new passage and not the original one. Any ideas on how to fix that?

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.