moving camera control code to frame listender