Expressing Interactivity with States and Constraints