Skip to content

Instantly share code, notes, and snippets.

@rjattrill
Created August 7, 2012 03:55
Show Gist options
  • Save rjattrill/3281357 to your computer and use it in GitHub Desktop.
Save rjattrill/3281357 to your computer and use it in GitHub Desktop.
Refresh Flash Object using F5
// Allow F5 to reload the browser window including the SWF object itself.
// Thank you Jake Howlett: http://www.codestore.net/store.nsf/unid/BLOG-20091027-0543
private function init():void {
FlexGlobals.topLevelApplication.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
}
private function keyHandler(event:KeyboardEvent):void {
if (event.keyCode==116)
ExternalInterface.call("window.location.reload");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment