{"id":1862,"date":"2010-11-15T10:24:59","date_gmt":"2010-11-15T10:24:59","guid":{"rendered":"http:\/\/mts-help.nick.php.dev\/after_sale_support\/Working_with_Flash\/Advanced\/article20.html"},"modified":"2015-09-17T10:17:26","modified_gmt":"2015-09-17T14:17:26","slug":"using-java-script-open-new-windows-with-fixed-size","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/using-java-script-open-new-windows-with-fixed-size.html","title":{"rendered":"Using Java script to open new windows with a fixed size"},"content":{"rendered":"<span class=\"question\">Q:<\/span> 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. <span class=\"question_text\">\r\n<\/span>\r\n<span class=\"answer\">A:<\/span> <span class=\"answer_text\">You can use Java script to do this. <\/span>\r\n\r\nIn flash it should be assigned to the button (image, text etc.)\r\n<div class=\"example_code\">on (release)\r\n{\r\ngetURL(&#8220;javascript:openNewWindow(&#8216;mypage.html&#8217;,&#8217;mypage&#8217;,&#8217;height=xx,width=xx,toolbar=no,scrollbars=no,resizable=yes&#8217;)&#8221;);\r\n}\r\n\r\n<\/div>\r\nIn index.html that relates to this flash you should write in the following java script, like this (don&#8217;t change anything):\r\n<div class=\"example_code\">&lt;script language=&#8221;JavaScript&#8221;&gt;\r\nfunction openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }\r\n&lt;\/script&gt;\r\n\r\n<\/div>\r\nPut it between &lt;head&gt;&lt;\/head&gt; tags in index.html. Then add the following part to &lt; embed&gt; tag:\r\n<div class=\"example_code\">swLiveConnect=true NAME=yourmovie.swf\r\n\r\n(&lt;embed src=&#8221;yourmovie.htm&#8221; quality=&#8221;high&#8221; pluginspage=&#8221;http:\/\/www.macromedia.com\/go\/getflashplayer&#8221; type=&#8221;application\/x-shockwave-flash&#8221; width=&#8221;xxx&#8221; height=&#8221;xxx&#8221; swliveconnect=true name=yourmovie.swf&gt;&lt;\/embed&gt;)\r\n\r\n<\/div>\r\nIt should work.","protected":false},"excerpt":{"rendered":"<p>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.) [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[355,279],"tags":[486,529],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/1862"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=1862"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/1862\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=1862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=1862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=1862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}