Categories

Featured templates

Using Java script to open new windows with a fixed size

Template-help.com Team November 15, 2010
Rating: 4.0/5. From 2 votes.
Please wait...
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); } </script>
Put it between <head></head> tags in index.html. Then add the following part to < embed> tag:
swLiveConnect=true NAME=yourmovie.swf (<embed src=”yourmovie.htm” quality=”high” pluginspage=”http://www.macromedia.com/go/getflashplayer” type=”application/x-shockwave-flash” width=”xxx” height=”xxx” swliveconnect=true name=yourmovie.swf></embed>)
It should work.
This entry was posted in General tutorials, Working with Flash and tagged flash, pop-up. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket