Yes, you have to be physically present in the state at the moment of gambling, but you do not need to reside in the state.