Solved

Embedded Flash resize to browser window.

Posted on 2012-04-03
5
581 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:rickhobbs
rickhobbs earned 332 total points
Comment Utility
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:rickhobbs
rickhobbs earned 332 total points
Comment Utility
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
Comment Utility
you should look into swfFIT for this type of issue...

http://swffit.millermedeiros.com/


rp
0
 
LVL 37

Expert Comment

by:CyanBlue
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

772 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

11 Experts available now in Live!

Get 1:1 Help Now