Solved

Embedded Flash resize to browser window.

Posted on 2012-04-03
5
582 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Guacamole cut and paste issue 3 49
Javascript create file issue 4 49
is this a cms? 8 36
what is the difference between call and apply 1 26
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
Several part series to implement Internet Explorer 11 Enterprise Mode
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

863 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

18 Experts available now in Live!

Get 1:1 Help Now