Hello,

So basically, I have a javascript array and a function on my html page, and I need actionscript to be able to pick the right one from the array and run the function based on what button I pushed.

My javascript is:
Code:
<script>
        navArray = new Array();

        navArray["home"] = "../index.aspx";
        navArray["about"] = "../about.aspx";
        navArray["contact"] = "../contact.aspx";
        navArray["services"] = "../services.aspx";
        navArray["mediainterface"] = "../mediainterface/";
        navArray["photogallery"] = "../photogallery/";

        function navigate(which) {

            if (window.opener) {

                if (which == "contact" || which == "services")
                {
	                window.open (navArray[which], 'newWin')
                }
                else if (which == "photogallery" || which == "mediainterface")
                {
	                window.location = (navArray[which]);
                }
                else 
                {
	                window.opener.location = navArray[which];
	                opener.window.focus();
                }
        	
            }
            else 
            {
                window.location = (navArray[which]);
            }	

        }
</script>
I'm a little lost on the AS part of it, what would be the best way to have the each different button run it's respective part in the JS array/function?

Thanks