So I have a thing in my green-foot game that allows to select levels and I have multiple pages to I have multiple worlds for each page.
every world have but level 2 has new LeveSelectMenu3
and so on. when ever I press down the right arrow key it will skip level pages, I know because when I have the key pressed it goes onto the nest world and it notices that I have the right arrow key down so it goes to the next page. can someone help me so when ever I press the right arrow key it goes to the next page instead of another page.
sorry if this did not make sense.
if(Greenfoot.isKeyDown("right"))
Greenfoot.setWorld(new LevelSelectMenu2());

