probably should show us all of your code >.>
if (Greenfoot.isKeyDown("space")) //or whatever is checked when the princess is saved. { Greenfoot.setWorld(new world()); // the 'world' in the '()' is a reference to whatever world you want to switch to. }