The last time i took fireworks photos is during this year's Australia Day....and incidentally this time the photos are a little bit more successful than my previous attempt (couldn't count how many failures i have so far)
I am just a beginner but this is what i did:
Use ISO as low as possible. I use ISO 100 on my K-7.
Use bulb mode and remote shutter release. Not sure how to do this otherwise if using the K-x.
Use tripod (this is a no brainer)
Pre-focus the scene and leave the lens setup at MF.
Use RAW
Then I just press the button when the fireworks start and when the "explosions" get a little bit "old" in the sky, I press the button again to close the shutter. I think i open the shutter something like 20seconds or so. I tried not to go over the 30s limit as in doing so, the K-7's dark frame subtraction thingy kicks in and the camera lags a fair bit and this will result in some miss shots.
These are some of my amateur shots...won't win any prizes but it is my best attempt in 3 years....yes..i am that bad.