Joseph Walsh had been an actor for over 20 years. Frustrated with the progress of his career and the sorts of roles he had been playing, he wrote a screenplay about his own gambling addiction in 1971.