Solved

Set the size of an opening html page.

Posted on 2008-06-18
10
160 Views
Last Modified: 2011-10-19
I am in flash 2.0 and want to use a geturl to bring up page /video.html.  ....   I want to limite the size of the screen opening to w=320 h=240 and have it centered in the screen.  Please help.

THank you
0
Comment
Question by:solsticeint
  • 5
  • 3
  • 2
10 Comments
 
LVL 8

Expert Comment

by:section25
ID: 21814308
First of all, you need to distinguish between your Flash file and your html page. Your flash file can not load an html page into it. If you are trying to load a video into an object on the flash stage, that is certainly doable and you can easily control the size, but if the video is contained inside of an html page, then you can not simply import that html page into your flash file. If you are trying to control the size of your browser window, that is also a seperate subject.

Please give more details about what you are trying to accomplish.

Thanks.

0
 

Author Comment

by:solsticeint
ID: 21814347
I am trying to control the size of a new browser window.  It will house the other flash file....  basically I am launching a separate video window...
0
 

Author Comment

by:solsticeint
ID: 21814525
I would also like to not have any of the header items....
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
LVL 11

Expert Comment

by:sibgig
ID: 21815336
step by step how to plus files to download and tryout, all available here:

http://www.kirupa.com/developer/mx/centered_popup.htm
0
 
LVL 8

Expert Comment

by:section25
ID: 21815356
Unfortunately, you will not be able to really achieve what you are trying except on a very limited basis. Flash won't be able to control the sizing of the browser window. So you will need to do that from javascript (you could do it in the window itself). However, most modern browsers will automatically negate your command to control it.

For instance I use IE 7 and all new windows (including all pop ups) open up in a separate tab for me. The tab can not be a different size than any of the rest of my windows because they are all in the same main browser window. So even when I issue the following command from javascript:

function open_new_window() {
       
        URL = "whatever.html";
        windowName = "new_window";
        windowFeatures = "width=800,height=450,left=100,top=50,screenX=0,screenY=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no";
        var newWindow = window.open(URL, windowName, windowFeatures);
        newWindow.focus();
      }

It opens up in a full size browser (tabbed) window. Firefox is very much the same way. So if you want to attempt this, you can use the above code to have the url that you want to go to, resize itself with a call to that function using:

<body onLoad="open_new_window()">

But you can't do it from flash.
0
 
LVL 8

Expert Comment

by:section25
ID: 21815442
Looking at the example from kirupa's site, I stand corrected in that you can send the commands from Flash, but as stated, when I click on the "Go" button on that site, I get a full size (uncentered) tabbed window, without any of the options as they are listed in the calling function. My menu bar is there, my location bar is there, my window is resizeable, etc. So just take that into consideration when designing your site. That not everyone (in fact quite a lot of people) won't see it as you think they will.
0
 
LVL 8

Expert Comment

by:section25
ID: 21815460
BTW, that example is 4 years old; when older versions of browsers were easier to control.
0
 
LVL 11

Accepted Solution

by:
sibgig earned 500 total points
ID: 21816129
old doesn't mean it doesn't still work.

the situation you describe of new windows opening in a new tab as opposed to an actual new window is a USER based preference, not one set by the browser. see attached jpg


prefs.jpg
0
 
LVL 8

Expert Comment

by:section25
ID: 21816559
My point was just that the developer does not have 100% control over how their page is viewed, so be aware of that when designing the page.
0
 
LVL 11

Expert Comment

by:sibgig
ID: 21817291
>the developer does not have 100% control over how their page is viewed


agreed... applies to almost (if not all) things web related.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question