button.addEventListener(MouseEvent.CLICK , onClick); function onClick(e:MouseEvent) { root.gotoAndPlay(2) }