Have link open in same page
I inherited some code from a previous programer. The idea is that a user clicks on the player and that opens the page at a new url. It works if it opens in a new page but it doesn't work trying to open the url in the same page. It just closes the player. Here is the code:
function gotoLink(event:MouseEvent) {
ns.pause();
if (openwin=="_blank") {
ExternalInterface.call("window.open('"+vidlink+"')");
}
else {
ExternalInterface.call("window.location.href=('"+vidlink+"')");
}
ExternalInterface.call("hideDiv()");
}
Can someone help me out?