The only way I have been able to make a YN-560 (fully manual El-Cheapo) to work as slave to the built-in flash with the K-x has been setting the external flash in a slave mode where it ignores pre-flash ("S2"). The regular slave mode ("S1") results in the flash firing, but taking a picture with the flash in the frame shows that it does fire while the shutter is open no matter which flash mode is set on the body: my impression is that the K-x built-in always emits a pre-flash.
As suggested, radio triggers are a way around this. The dirt-cheap ṔT-04 seems to work reliably (~US$25 1+2 set incl. postage from a Chinese Ebay seller). I would look into the new Cactus triggers too if I was getting a set now though, they are probably well worth some extra cash and still inexpensive
. Another workaround would be an external flash which does not emit a pre-flash as a master.