- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Using Java script to open new windows with a fixed size
November 15, 2010
Q: I have a flash template. I would like to open new windows with just the images in them and certain options like no scrollbars, no toolbars, specific height and width, etc. Please, advise.
A: You can use Java script to do this.
In flash it should be assigned to the button (image, text etc.)
on (release)
{
getURL(“javascript:openNewWindow(‘mypage.html’,’mypage’,’height=xx,width=xx,toolbar=no,scrollbars=no,resizable=yes’)”);
}
In index.html that relates to this flash you should write in the following java script, like this (don’t change anything):
<script language=”JavaScript”>
function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }
Put it between tags in index.html. Then add the following part to < embed> tag:
swLiveConnect=true NAME=yourmovie.swf
()
It should work.