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!

Does this make sense???

Status
Not open for further replies.

natedeia

Technical User
May 8, 2001
365
US
I found a tutorial on how to make a popup window in Flash and yet have I got it to work properly. I have tried quite a few ways and just can't seem to get past this problem. The following is something I tried lately, want to see if you guys see what is missing because it is either missing something or it is operater error!

Open New Window - Specific Window Control



In the HTML of the page containing your swf movie, add the following code inside your <head></head> commands:

<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--

function popUp()
{
window.open(&quot;myurl.html&quot;,&quot;WindowName&quot;,&quot;WindowOptions&quot;);
}

//-->
</SCRIPT>






Add your URL in place of &quot;myurl.html&quot;, add your window name, and window options. Window options control the size and look of your new window. The format is:

'toolbars=1,location=1,....,width=###,height=###'

And your window options are: (1=show, 0=no show)

toolbar - Specifies if the browser's toolbar is displayed or not
location - Specifies if the address bar is displayed or not.
directories - Specifies if the Netscape directory buttons are displayed.
status - Specifies if the browser status bar is displayed or not.
menubar - Specifies if the browser's menu bar is displayed or not.
scrollbars - Specifies if the window will allow scrollbars or not.
resizable - Specifies if the new window is resizable or not.
width=pixels - Specifies the width of the new window.
height=pixels - Specifies the height of the new window.
left=### - Specifies the distance of the window from the screen's left.
top=### - Specifies the distance of the window from the screen's top.

For example, the very upper left corner would be left=0,top=0





In the manner used in the Simple Method above, use the same Actions, but in the Get URL Action add:

javascript:popUp()

So it should look like this:

On (Release)
Get URL (&quot;javascript:popUp() &quot;)
End On

You don't need to worry about the _blank command, because that javascript code takes care of that for you.

 
Seems OK and should work. Of course you would have to define the WindowOptions in the javascript function.
Don't know where you picked up this script, but you should check TulsaJeff's faq250-697, which is basicly the same, and where he does include the window's attributes, in the call to open the popup.

Regards,
mywink2.gif
ldnewbie
 
Now it all makes sense! Thanks for coming through again, hey just thought of another question to post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top