Created
August 7, 2012 03:55
-
-
Save rjattrill/3281357 to your computer and use it in GitHub Desktop.
Refresh Flash Object using F5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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