Set an instance variable on the level select sprites and number them in order. Then you say something like f object.var=1 set frame to global variable 1. If object.var=2 set frame to global variable 2. This matches the frame, and in a way the level, to the star score variables.