They were echoes of the person...they had the knowledge of their old selves, but were echoes, not ghosts. So if James was well learned in magic in life, he'd know what to do.
One thing about ghosts- Nick says in book 5 that they are mere imprints of that person meant to dwell where they once inhabited, I think...so how is it that during his Death Day parties, he can have ghosts from all over (the Headless Horse Hunt) come around? Hogwarts probably isn't the place they inhabited in life.
