Solved

Set the size of an opening html page.

Posted on 2008-06-18
10
157 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
 
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now