Skip to content

Instantly share code, notes, and snippets.

@lynndylanhurley
Created December 15, 2010 16:52
Show Gist options
  • Save lynndylanhurley/742239 to your computer and use it in GitHub Desktop.
Save lynndylanhurley/742239 to your computer and use it in GitHub Desktop.
private function onSWFAddressChange(evt : SWFAddressEvent) : void {
var rawPath : String = SWFAddress.getPath();
LogManager.log('onSWFAddressChange: rawPath = ' + rawPath, this, 1);
var standardizedPath : String = PathManager.getStandardizedPath(sanitizeSWFAddressPath(rawPath));
LogManager.log('onSWFAddressChange: standardizedPath = ' + standardizedPath + ', currentPath = ' + currentPath, this, 1);
if(!standardizedPath) standardizedPath = PathManager.DEFAULT_PATH;
dispatchEvent(new ViewEvent(ViewEvent.CHANGE,standardizedPath));
if(standardizedPath == currentPath) {
LogManager.log('onSWFAddressChange: path is the current path. aborting load.', this, 2);
viewLoader.killActiveLoad();
} else {
loadView(standardizedPath);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment