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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newBrWindow with Flash button

Status
Not open for further replies.

ironworks

Technical User
Oct 13, 2001
16
US
Does anyone have an answer on how to dictate the size of the new window that Flash 5 will understand?

I have this in the Object Actions window
**********************************
on (press) {
getURL ("javascript:MM_openBrWindow ('archMenu.htm', 'width=310, height=170, top=165, left=575');");
}
**********************************

The button calls a new window just fine, but the size of the window is not referencing the parameters indicated within the parentheses.

The debugger claims it a JS error in that it expects a ')' after the calling of the .htm

Thanks a million!

ironworks

 
Your quotes are a bit messed up. Try:

Code:
on (press) {
    getURL ("javascript:MM_openBrWindow ('archMenu.htm', width='310', height='170', top='165', left='575');");
}
frozenpeas
 
frozenpeas,

good call, but your method produced the same results.

I saw in faq250-697 that the HTML file that contains the Flash File must have the following code:
**************************
<HEAD>
<TITLE>Your Title Goes Here</TITLE>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
function yourpopupname()
{
window.open(&quot;URL address of window to be opened as a popup&quot;,&quot;_blank&quot;,&quot;directories=0,menubar=0,scrollbars=0,toolbars=0,location=0,width=#of pixels,height=#of pixels,left=#of pixels from left edge,top=#of pixels from top edge&quot;);
}
//--></SCRIPT></HEAD>
***************************

Is that my problem? Let me try it.
 
Yes, you must have the MM_openBrWindow function defined in the HTML code in order for Flash to do anything with it. frozenpeas
 
Or the whole function can be in the getURL...

Code:
on (press) {
    getURL(&quot;javascript:NewWindow=window.open('your.html','newWin','width=400,height=400,
left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');NewWindow.focus();void(0);&quot;);
}
[code]

No linebreaks, no spaces! Regards,

[img]http://members.lamicro.com/~FGill/oldman3.gif[/img]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top