Force browser to refresh page from flash game

1k views Asked by At

I have flash game which communicate with server. If something goes wrong I want to show popup where will be said. Something is broken press ok button to refresh game.

btnHolder.addEventListener(MouseEvent.CLICK, refreshPage);

private function refreshPage(e:MouseEvent):void
{
...
}

How can I do this ? Is this even possible ? Or max I can do is just show popup with text "refresh your browser".

1

There are 1 answers

2
dkasipovic On BEST ANSWER

You could use ExternalInterface, like:

ExternalInterface.call("document.location.reload", true);

Could that work for you?