View Full Version : Flash question - window resizing
PackerFanatic
05-14-2007, 04:16 PM
Hey guys and gals...I have a question for you Flash gurus out there. I developed a game for one of my classes and I have been pondering on something...I am pretty sure it is possible to do, but I am just not sure how. Is there a way to make it so the user cannot resize the window that the Flash movie opens up in? Basically, it opens up 800x600, but then the user can always drag it around and play with it how they feel, showing things that may be off the visible stage. Is there code or something I can do to not allow this? Thanks in advance :)
PackerFanatic
05-15-2007, 02:15 AM
No Flash people out there? Sad day :(
Zippo
05-15-2007, 03:31 AM
I don't know if it's possible to set a certain window size but you could just make it a full screen with the area outside of the stage filled with the background color.
Just put this piece of actionscript in your first frame: fscommand("fullscreen", "false");
The user can exit full screen with the Esc key or you can make a button make that statement true. Hope this helps.
Antmeister
05-15-2007, 10:26 AM
Hey guys and gals...I have a question for you Flash gurus out there. I developed a game for one of my classes and I have been pondering on something...I am pretty sure it is possible to do, but I am just not sure how. Is there a way to make it so the user cannot resize the window that the Flash movie opens up in? Basically, it opens up 800x600, but then the user can always drag it around and play with it how they feel, showing things that may be off the visible stage. Is there code or something I can do to not allow this? Thanks in advance :)
Am I reading this correctl? Are you asking if there is a way to have a fixed window size or did you mean what the previous poster asked?
If you are asking for a fixed window size, you are already setting that in Flash when you set the stage size. If you are asking for the ability to have a flexible window, have you considering creating a mask that can be resized to give the illusion of a smaller or bigger window?
PackerFanatic
05-15-2007, 10:29 AM
I already know about fixed window size, since obviously you set that with stage size. But when the movie opens up and they start making the window bigger, you can see all the crap off the stage. I've heard of a way of doing this (that is easier than a mask, although I'll do that if I have to) but I can't remember it for the life of me...
Antmeister
05-15-2007, 10:49 AM
I already know about fixed window size, since obviously you set that with stage size. But when the movie opens up and they start making the window bigger, you can see all the crap off the stage. I've heard of a way of doing this (that is easier than a mask, although I'll do that if I have to) but I can't remember it for the life of me...
Okay, now this is where I am confused. Are we talking about an executable or a .swf embedded in a web page? If it is embedded in a web page, you won't have to worry about people resizing it, because the size can be set there. If it is an executable, there is still a way to lock the window size, but I don't remember the Actionscript.
Now if your is to actually resize the .swf without seeing any of the contents offstage on a webpage, you will have to use some javascript. The javascript would have to be used to control the height and width of the .swf, because on a web page, you can control the size of your .swf when you embed it. as shown below.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="800" height="500" align="absmiddle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="IDT_Main.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#000000" />
<embed src="IDT_Main.swf" quality="high" bgcolor="#000000" width="800" height="500" align="absmiddle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
PackerFanatic
05-15-2007, 11:00 AM
Yeah, it would be for the executable, I suppose I could just put it online and not really worry about it.
Antmeister
05-15-2007, 11:01 AM
By the way, the reason why I appeared confused is because I cannot see offstage content if I publish an executable or swf. However, I don't know what version of Flash you are using or if it is possible that there are some default settings I may have set to prevent that from happening.
I do recall that happening with executable in older versions of Flash, but I never seen that occur on a web page ever.
Antmeister
05-15-2007, 11:11 AM
Yeah, it would be for the executable, I suppose I could just put it online and not really worry about it.
Aha....what version of Flash sir? There still may be an answer if this is the route you wanted to go initially.
PackerFanatic
05-15-2007, 03:14 PM
I am using Flash 8 Professional, I have looked around at the publish settings (for both SWF and EXE exports) and cannot seem to find anything, I had hoped it would be that easy too.
Antmeister
05-15-2007, 05:08 PM
I am using Flash 8 Professional, I have looked around at the publish settings (for both SWF and EXE exports) and cannot seem to find anything, I had hoped it would be that easy too.
Ugh....I am using the same thing and I tested it on a few files and didn't see this occur. I thought they got rid of that problem with this version, but I guess I am wrong. It still seems to occur on executables from time to time. :confused:
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.