all groups > macromedia flash sitedesign > july 2005 >
You're in the

macromedia flash sitedesign

group:

Help! How to lock window size?


Help! How to lock window size? withhisstripes
7/29/2005 8:23:44 PM
macromedia flash sitedesign:
Hey I have a flash website (www.srfchurch.org/theway) and I need to get the
..swf file to appear in a seperate window that's size is locked. Meaning, the
browser window is locked to the same size as the actual .swf. Does anyone know
how to do that?
Re: Help! How to lock window size? ANK...
7/30/2005 8:57:20 AM
Re: Help! How to lock window size? posted.by(Vern);
7/30/2005 10:41:41 AM
In your parameters for the window, probably in your JS or maybe in your AS
(I dont know how you are popping up the window) just ad the parameter,

resizable=no

This will keep the user from being able to drag with size larger or smaller.

--
Regards,
--Vern
===========================
onClipEvent(doSomethingStupid){
setProperty("Face", color, #FF0000);
_root.audio = "uh oh!";
}

Re: Help! How to lock window size? posted.by(Vern);
7/30/2005 11:23:18 PM
How are you popping up the window?

--
--
Regards,
--Vern
===========================
onClipEvent(doSomethingStupid){
setProperty("Face", color, #FF0000);
_root.audio = "uh oh!";
}

Re: Help! How to lock window size? withhisstripes
7/31/2005 12:25:06 AM
Okay, I understand what you're saying to do but I don't know how to go about
doing that. I simply have my .swf inserted into a blank html file (index.html).
I'm not using javascript or asp, nor have I ever :/. Can you walk me through?
Re: Help! How to lock window size? withhisstripes
8/1/2005 1:09:45 AM
Re: Help! How to lock window size? posted.by(Vern);
8/1/2005 11:57:17 AM
Gotcha, I had failed to look at the link you posted.

There are a couple of ways to go, it looks like you want the SWF to load up
into a popup when the user first enters that page? Yes? If so, then you can
add some HTML to the opening page to make this all happen. You can also
make it happen with a click of a button, or from within an SWF if you have
the FLA and can edit it with Flash.

First, create a function within your HTML page (or in a seperate JS file if
you prefer) The function might look like this:

function flashWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
//var mypage = 'http://www.YOURDOMAIN.com/Path to Flash File.swf';
winprops =
'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

The second two lines will center the popup in any size screen resolution, so
it will always be centered, regardless of the users screen size or res.
Note that your specific information goes on line FOUR. If you get it wrong,
it will not work, and remember, everything after .com/ IS case
sensitive.

Next, to make the pop up happen automatically on page load, as to the <BODY>
tag something like this:

<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0
ONLOAD="flashWindow(this.href,'MyFlashFile','800','600','yes','no','resizable=no','toolbar=no','location=no');return
false;">

in this example the 800 and the 600 are the sizes you have to set according
to how you want it. The "resizable=no" is what keeps the user from resizing
the window on you!

HOPE THAT HELPS!!

<><

--
Regards,
--Vern
===========================
onClipEvent(doSomethingStupid){
setProperty("Face", color, #FF0000);
_root.audio = "uh oh!";
}

AddThis Social Bookmark Button