PDA

View Full Version : Scaling Browser window to match flash movie dimensions


rmc1006
03-23-2008, 02:19 PM
Hi Everyone,

Using Flash's Publishing settings, it is easy to match the flash movie to the size of the browser window, but is there a way to change the browser window to the size of the flash movie, and constrain it so the user can't make it bigger?

I was hoping a couple of lines of html code would do the trick.
Any suggestions?
-Rich

ASWC
03-23-2008, 02:36 PM
It's possible but you need to use javascript for that.

atomic
03-23-2008, 02:39 PM
Change the size of it yes, constrain it no... You need to open a unresizable popup for that, and with javascript...

rmc1006
03-23-2008, 03:50 PM
Thanks for the reply! I never used javascript before, and have seen other threads which say the same thing, but where does the javascript go? In flash? In the index.HTML file?

Thanks for the help!

ASWC
03-23-2008, 05:28 PM
Javascript runs from inside a html page, directly as part of the code or in external files.

atomic
03-23-2008, 11:27 PM
It can also be called directly within the flash movie...

rmc1006
03-24-2008, 12:51 AM
can you give me an example? Like I said, I never used javascript before.
I've tried with no success, so any help would be appreciated.Thanks!

ASWC
03-24-2008, 01:19 AM
Even Atomic should be able to do this. In your html head section put this to test it:
<script language="JavaScript">
<!--
// This will resize the window when it is opened

window.resizeTo(500,500)
-->
</script>

atomic
03-24-2008, 02:17 AM
Yeah, I can do that with 9 fingers up my nose, and even get paid on top of it all...

You're seriously starting to get on my nerves!

If you have nothing better to do than to challenge me in every other post, go play some game or freelance somewhere else!

ASWC
03-24-2008, 04:06 AM
Yeah, I can do that with 9 fingers up my nose, and even get paid on top of it all...

You're seriously starting to get on my nerves!

If you have nothing better to do than to challenge me in every other post, go play some game or freelance somewhere else!
You have problems.... It's probably better to just ignore you from now on. No wonder you have been banned a few times. And here is mallen PM for which I answered that I did not have the time to do it:
If you could help me out with this video player it would be great. I am going around and around with this guy on the forums.
So long freak...

rmc1006
03-24-2008, 11:03 AM
Thanks, ASWC. That worked great.

-Rich

rmc1006
03-24-2008, 02:03 PM
Actually, This does work, but how do I make this work like a pop-up? I have a flash movie (AS2) which has a button with code to get url, using the _blank window option. I would like it to open in a new window, instad of a new tab, because I don't want the window underneath to shrink as well. Is this possible?

Thanks again for all your help!
-Rich

atomic
03-24-2008, 02:59 PM
You need to open up a popup window...

http://www.flash-db.com/PopUp/

http://www.kirupa.com/developer/mx/centered_popup.htm