I'm setting up an introduction to using Javascript in Adobe Animate HTML5 Canvas for a course I teach. Honestly I haven't done any work in that myself but I've done a bit of Actionscript gaming as well as some Javascript programming outside of Animate, so I'm not entirely clueless.
Part of the exercise is to have a button that opens a URL. It does, but it opens many tabs of it. I'm nto sure how to limit it so it only opens one tab of the URL.
Here's my code. Thanks for your help:
this.urlBtn.addEventListener("mousedown", openPage.bind(this));
function openPage(event) {
window.open('http://www.cartoonthunder.net/', '_blank');
}