colors = ["red", "orangered", "orange", "gold", "yellow", "yellowgreen", "green", "darkgreen", "teal", "blue", "darkblue", "indigo", "purple", "magenta"] col_index = 0 color = colors[0] def mouse_move(): x = stage.mouse_x() y = stage.mouse_y() global col_index global colors global color col_index = (col_index + 1)%len(colors) color = colors[col_index] new_square = codesters.Square(x, y, 25, color) # add other actions... stage.event_mouse_move(mouse_move) # def interval(): # stage.event_interval(interval, .01)