The older lenses should work well. Make sure none of them have Ricoh pin contacts as these will cause trouble when mounted to the digital bodies of Pentax. If any have an R in the P-KR or P(A) KR; any R - seek opinions before mounting those.
Now go in your camera menu and in the Custom Settings on one of the last pages see Aperture Ring Use and select allow. Then read this.
Shooting manual lenses on Pentax DSLRs « robertsdonovan.com
With the flash - it's more a question of voltage. And someone else will be along shortly to help you with that. Or do a little search around the forum as the question has been publicly addressed before.
Welcome to the forum and congratulations on continuing your photography with Pentax and the K-x.