Smooth Scroll to Link with Anchor
Hi,
I having the following code working on a HTML5 canvas animation:
stage.enableMouseOver(25);
this.movieclip.cursor = "pointer";
this.movieclip.addEventListener("click", ScrollToAnchor);
function ScrollToAnchor() {
window.open("http://websitedomain.com#anchorname", "_self");
}
I would like to set up the page to smoothly scroll down to the anchor on the current page when a movieclip is clicked on at the top of the page. Is this possible? If so, please can someone point me in the right direction?
Kind regards,
Peter
