Up | Down

 

Using Java script to open new windows with a fixed size

~ ~
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.swf" 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.

0 comments:

 
© 2009 - canwecan.com
IniMinimalisKah is proudly powered by Blogger