How do i make a characters lips match the sounds?

I’m creating a flash game, and I’m having trouble making the guys lips match up with the words he says. Any hints?

most times that i’ve seen this done the author has simply keyframed it and tried to match the sound as best they could.

I’ve done a lot of lip-synched character animation (pre-Flash), and it helped to open the sound file in a sound-editing program (I use Sound Forge FX, but you could even use the Microsoft Sound Recorder accessory). Make note of the times different sounds occur, multiply the time in seconds by your frame rate, then, make your key frames accordingly. For realistic lip synch, you’ll need a lot of key frames. I also found it helpful to create small pictures of different mouth positions and worked with these small files to get the voice synched. Then when that was smooth I added the rest of the character’s movements.

Hope this helps.