# JS function: launchSite('about')

**URL:** https://forum.kirupa.com/t/js-function-launchsite-about/190462
**Category:** flash
**Created:** [June 12, 2006, 3:39am UTC](https://forum.kirupa.com/t/js-function-launchsite-about/190462 "2006-06-12T03:39:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![AfterAll](https://avatars.discourse-cdn.com/v4/letter/a/b5e925/32.png) [@AfterAll](https://forum.kirupa.com/u/AfterAll)
#### Post date: [June 12, 2006, 3:39am UTC](https://forum.kirupa.com/t/js-function-launchsite-about/190462/1 "2006-06-12T03:39:14Z")

</div>

I have this stupid JS code I can’t figure out, cuz I’m in no way a coder.

Basically what needs to happen is, the js function in the HTML needs to open the flashsite in a popWin and go to a certain scene, ie: “about”.

I’m completely confused and I’ve gone over the JS and the \*.fla which has been handed over to me to update, except now the JS in the index page’s HMTL don’t work no more. The website is [http://www.avianleisure.com/](http://www.avianleisure.com/)

Each scene is labeled correctly, but the flashpage simply stops at the ‘home’ page, no matter which link you click on.

The JS looks like this:  
[SIZE=1][COLOR=Gray]\<!–  
function popWin(theURL,winWidth,winHeight,showLocation,showMenu,scrollWin,resizeWin) {  
var winX = (screen.width - winWidth) / 2;  
var winY = (screen.height - winHeight) / 2;  
windowAttributes= (‘width=’+winWidth+’,height=’+winHeight+‘location=’+‘showLocation’+’,menubar=’+showMenu+’,scrollbars=’+scrollWin+",resizable="+resizeWin+",left="+winX+",top="+winY);  
window.open(theURL, “”, windowAttributes);  
}  
function randomURL(theStr) {  
var s = new String(theStr);  
s += (s.search(/?/) != -1) ? ‘&’ : ‘?’;  
s += ‘randomurl=’ + Math.round(Math.random() \* 1000000);  
return s;  
}

function launchSite(strPage) {  
[COLOR=Silver]//popWin(randomURL(‘avian.php?autoJump=’ + strPage), “800”, “580”, “no”, “no”, “no”, “yes”);[/COLOR]  
if (strPage == ‘who’ || strPage == ‘birding’ || strPage == ‘news’) {  
strPage = ‘\_’ + strPage;  
} else {  
strPage = ‘’;  
}  
popWin(randomURL(‘avian’+strPage+’.htm’), “800”, “580”, “no”, “no”, “no”, “yes”);  
}

function launchWin(strPage) {  
popWin(randomURL(strPage), “510”, “550”, “no”, “no”, “yes”, “yes”);  
}

function launchRates() {  
popWin(randomURL(‘rates.htm’), “600”, “550”, “no”, “no”, “yes”, “yes”);  
}

function launchEnquiry() {  
popWin(randomURL(‘contact.htm’), “550”, “550”, “no”, “no”, “yes”, “yes”);  
}  
// --\>

[/COLOR][/SIZE]I can’t find anything inside the \*.fla that has any link to this JS Function or anything that would hinder it from working. I’m using Flash 8, if that makes any difference.
