Sunday, June 27, 2010

Chapter 7...Ugh

Wow, what a beating this one gave me. Starting to put sounds into code. Wasn't having any problems with sound effects being played by hitting the face buttons, but once I started the "play" and "pause" functions, things got all wonky. Basically, the program looks to see if the music is already playing or not. Well, there was a missing piece of code (at least in how it was explained to me) that you use to get the instance of the sound: CreateInstance.

Quintinon, on the forums, was nice enough to help me with the code and post some examples. Kind of embarrassing: he tells me the solution, I try it, and nothing happens. So I post on the forum thanking the guy for his help but telling him he was wrong. I tried it again and it worked. Had to go back and apologizing for thinking he was wrong.

Well, didn't solve all of the problems with sound, but I feel like I have a strong enough foundation to where I can move to the next chapter: Creating a Timer. I'm hoping that one won't have any snags, as the last 2 have proven worrisome.

I can't wait till the day that I can answer questions for people, but I will settle for having a firmer grasp on C#.

No comments:

Post a Comment