Monday, 16 November 2009

Case 9

Sound is a vital part of a game, as it helps to bring the interactivity and gameplay to a new level. Without sound, it would loose alot of the charm. I added sound to my game with a few simple commands. First I had to import flash.sound and soundchannel. Without these, flash would not play the sound. The I created some Variables importing my sound from the flash file, and then set the sound to play.

In addition to background music I created a jump sound that would play each time he, of course, jump. This was done by entering sc2 = jumpSound.play(); in my jumpcode. The sc2 means that the sound will be played in sound channel 2, and will not overlap the background music.

1 comment: