Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stick Question calling JS function movie on level 2

Status
Not open for further replies.

kimraznov

Programmer
Oct 16, 2000
31
US
I am having a frustrating problem.

I want to open a browser window from flash, to a specific with and height. I have been able to do it by placing the function with the associated parameters...

function ana()
{
window.open("ana1.htm","","width=655 height=400");
}

in the html window that the main flash movie resides in, then I place an action on the button in the flash movie which calls the function...

on (release) {
getURL ("javascript:ana1()");
}

This is great, except I need to open about 50 different windows, using different button, and have them each open to preset sizes. I don't want to have to write 50 functions, but I can not reverse the code here... it should also work, if I call the function from flash and place the parameters in the get url window, then in the html page simply place a function with placeholder parameters.. right? Well it won't work... the tutorial I downloaded says it should work.

What am I doing wrong?


 
What you need is :

<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript
function popup(url,width,height) {
window.open(url,&quot;&quot;,&quot;width=&quot;+width+&quot; height=&quot;+height);
}
</script>

on (release) {
getURL (&quot;javascript:popup('ana1.htm','655','400')&quot;);
}

I know this works as I've tested it Regards

Big Dave

davidbyng@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top