Going to Level 2

Ok if i put a flag at the end of the level 1 right, and i want the main actor to hit the flag and teleport to level 2 would i do MAIN ACTOR-> Collision->script editor-> (view.x = player.x; view.y = player.y;:
view.x=800;//use your coordinates
view.y=600;
player.x=1200;
player.y=900;