Solved

Embedded Flash resize to browser window.

Posted on 2012-04-03
5
584 Views
Last Modified: 2012-09-13
I have a Flash movie embedded into my homepage. On laptops the company logo cannot be seen because it falls below the bottom edge of the browser window.

I would like to solve this with one of two solutions:

Have a script written that detects the size of the browser window (and/or resolution) if the window is too small or the aspect ratio is too horizontal, a differently sized flash will appear in the browser window. Like a script which detects whether or the not viewer is on a mobile phone and then brings up the mobile version of the website.

An alternate solution, that I woud prefer, would be to set a parameter, such as browser window height, and to proportionately scale down the overall Flash size if the browser window height is below that number.

Right now the exact dimension of the SWF file is "1024 x 790" and I have it nested into a one-row, one-column table of the same dimensions.

Can anyone help?
0
Comment
Question by:fintrater
  • 2
5 Comments
 
LVL 22

Assisted Solution

by:Rick Hobbs
Rick Hobbs earned 332 total points
ID: 37803394
Try this code to determine window size.

window.onresize = resizeImage;


function resizeImage() {
    var winW, winH;
    if (self.innerWidth) {
        winW = self.innerWidth;
        winH = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientWidth) {

        winW = document.documentElement.clientWidth;
        winH = document.documentElement.clientHeight;
    } else if (document.body) {
        winW = document.body.clientWidth;
        winH = document.body.clientHeight;
    }
   

    // if you want to resize image, put that code here.
}
0
 
LVL 22

Assisted Solution

by:Rick Hobbs
Rick Hobbs earned 332 total points
ID: 37803421
If you are using Javascript, check this link.

http://snippets.dzone.com/posts/show/10979
0
 
LVL 22

Accepted Solution

by:
rascalpants earned 168 total points
ID: 37882270
you should look into swfFIT for this type of issue...

http://swffit.millermedeiros.com/


rp
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 38394107
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Several part series to implement Internet Explorer 11 Enterprise Mode
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.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

803 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