Force the Image to fill the screen when the user resizes the window

I use flex and actionscript to create a site of photographer and I want the bottom to display an image that completely covers the bottom without distortion.  I tried just an image tag and characterized by the width and height to 100%, but the problem comes when the screen looks wider than the photo.  Thus, the height is reduced to 100% and the width is something less.  I would have rather it evolve according to what is most important, that is, if the window is too wide, the photo with a width of 100% on the scale and let the excess off the screen.  In this way, the photo is still cover the screen and there is no background color of distractrating showing.

I was counting on the use of actionscript to indicate the width and height of the image so that I can compare it to the height and width of the window, but it seems that you can not get the dimensions of the photo.  I use application.width and application.height, but I need a way to compare it to the photo.  Also, is there an eventlistener that I should use to monitor when the user resizes the window or image resizing will be done automatically?

Thanks for your comments,

Tim

The application container inherit "resize" event of UIComponent.

Application.application.Width will give you the size of the application in the browser window.

Thus,.

function myResizer() {}

img1. Width = Application.application.width;

}

Tags: Flex

Similar Questions

  • When a user logs off Windows 7 x 64 session, the rest can not access the internet until the restart network card

    Hello! I found a problem with my system: when a user logs off Windows 7 x 64 session, the rest can not access the internet, until restarted network card. Reinstall NIC driver did not help. Problem appears on a built-in adapter, in the motherboard and a separate PCI card too.  Same router via its web interface is not accessible. Windows cannot automatically fix this problem after trying to diagnose a problem with his problem Diagnostic tool. After the diagnosis in the DETAILS window, MORE tests, it displays a message like this "computer remote can not receive a connection via the Internet (HTTP) Service Port". "Unplugging" a corresponding Local network connection and then reconnect solves the problem immediately. Switching between users, when two of them are connected do not cause this problem. Important: the problem occurs in the account of the user who was logged on the system FIRST after the PC was on, when the user disconnected on newspapers of a SECOND. If the SECOND user is logged in and the FIRST user disconnects, SECOND can still access the internet. It depends only on the sequence of the user's record, not on the particular user name. And one more interesting fact: after each user registered on and outside just for once, the problem seems to disappear until the PC is turned off and turn it back on!

    System details:

    Motherboard: ASUS P8Z77-VLK
    CPU: Intel Core i7 3770 K
    RAM: 8 GB
    OS: Windows 7 x 64

    Hi, Mahesh,

    and thank you very much for your help! Update firmware driver and router LAN did not help me get rid of my problem, but greatly improved my experience of networking in general. Anti-virus software was not guilty, also, but! I found the "iControl" network software, installed as part of Sogiciel 'AI Suite II' (that came on the CD of motherboard ASUS driverssoftware), runnning and causing not only the problem mentioned above, but would also decrease upload speed up to 0.3 MB/s, when download passes to nearly 100 Mbps! Moreover, searching the Internet, I have found a lot of complaints about the behavior of this software, so that people watch you the occasional installation of this piece... sweet ;) As "iControl network" has been uninstalled (not only turned off in the settings of 'Ai Suite II'!), I'm totally happy with my system performance.

    Best regards
    Greg

  • Stretch an image to fill a screen.

    Can I make an image stretched to fill a screen? This example will grow only to fill the height or with 100% it doesn't stretch the image. Any thoughts on how to change this?

    <mx:Image source="assets/background.png" x="0" y="0" width="100%" height="100%" />
    
    

    Hi ryancanulla,.

    You must set the maintainAspectRatio = "false" on the Image control to stretch/scale to the full size of its container.

    Default maintainAspectRatio = "true" and he could not stretch completely... Then go to false.

    Thank you

    Jean Claude

  • Blue screen when you try to install Windows XP Home Edition on Satellite L350D-11 has

    Hello
    When I try to install Windows XP Home (including SP3) on my new L350D-11 has a blue screen after loading the drivers.
    When booting with Kubuntu Live CD (8.x) appears an error message: / sbin/modprobe out anomalous.

    At least I need Windows XP because of some programs that do not work under Vista. Is it possible to install XP?

    Hello

    Hmm I think the BSOD appears because you didn t add SATA drivers in the Win XP operating system.

    However, you can try to install Win XP on your laptop without the use of the SATA driver, but you can change the SATA AHCI in the BIOS in compatible mode.

    Check it out!

  • Games black screen when I run them in Windows 7.

    All the games that I got when I used Windows Vista were playable. Now with Windows 7, whenever one of my games starts in mode full screen, my screen goes black and does nothing else. The monitor still detects my computer because the monitor gave me no error of missing data. I can't alt + tab or Ctrl + Alt + Del or same WindowsLogo + Tab and I have to cut the power, then restart. After researching long tiring send me of these suspects like DirectX 11, disabling Aero, all the popular Miss computer requirements to play the game I could play until I installed Windows 7. My conclusion was that I could play games as long as there is not in full-screen mode or, in other words, the Windowed Mode.

    Why do I play all my games in Windowed Mode play on Windows 7? Is there a way to fix this?

    Find it me happen as well...

    Crysis, crysis 64 bit, world of warcraft, FarCry2... pretty much any game that launches full-screen.
    I put around the question a couple of times... some games allow you to set the options before the launch (games steam for example, fallout3 etc)... but if they launch full screen, you can't even Ctrl + Enter (if the game supports this feature ;))... screen keyboard mouse seem to simply disappear.
    I fixed it by disabling comodo defense + (note, you may have to disable in the main comodo - > defense + -> Advanced-> settings Defense + -> checkmark "disable the defense + permanently ')... guess I'll just have to trust any of the game developers to hide Trojans.
    If you have a Trojan Guard any... turn it off and see if they launch without a problem... (remember to turn it back on when done) if he does contact the manufacturer of the Trojans guard and let them know his past... perhaps win7 is different than vista and they freeze the process thinking that it is a Trojan or malware.
  • How can I get full screen when you run qbasic on Windows 7 starter?

    When I run Qbasic (Version 1.1) with Windows 95, I get a view full-screen. When I run Qbasic (Version 1.1) with Window 7 Starter I get a partial screen display. How can I get a display full screen when running Qbasic (Version 1.1) using Windows 7 Starter?

    Hello Joseph,.

    Sorry for the late reply. It seems that you cannot run Qbasic (Version 1.1) on your computer in Windows 7.

    You can uninstall the program and install it in compatibility mode. Here's how:

    1. Right-click on the configuration file (program).
    2. Go to Properties. Click on the compatibility tab.
    3. Place a check on the option run this program in compatibility mode for and in the drop-down list, choose the operating system on which it was working fine.
    4. Place a check on run as administrator under the level of privileges and click on apply , then OK.
    5. Now, double-click the setup file to start the installation.

    Do not respond if you have more related questions. We will be happy to help you. Thank you.

  • Why do I get a green screen when you use flash? (windows 8) I've updated, permits, active compatabitity, etc, according to the guides, and nothing works.

    Green screen?

    You have already posted the same question about someone else; is the answer you got in there, not good enough?

  • How to force the window 7 to find new audio device

    I have MCE PC with NVIDIA GT520 hung on the DVD Samusung/audio HDMI player which, in turn, hung at the entrance of HDMI LG TV. If I forgot to turn on the Samsung receiver when PC wakes from sleep PC loses audio. I have to reboot the PC to get the spectacle of the unit upwards. Will there be a static configuration to force window configured 7 with receiver Samsung as audio device?

    Hello

    Follow these methods and check if that helps:

    Method 1:

     

    I suggest you try to use the Audio playback problems troubleshooting to solve the problem. Click on the link below.

    http://Windows.Microsoft.com/en-us/Windows7/open-the-playing-audio-Troubleshooter

     

     

    Method 2:

     

    I suggest you update the audio drivers on the manufacturer's Web site see the link below:

    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

     

    See also the link below:

    http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-sound-problems

  • I get a black screen when I play videos in Windows Media Player and Windows Media Center.

    Until recently, all worked well for a long time. Now when you try to watch live TV or a DVD, I get a black screen with sound in Windows Media Center and trying to watch a DVD in Windows Media Player I also get a black screen with sound. The controls are there and functioning normally. DVDs are normally visible in the K-Lite Media Player Classic.

    I have Windows 7 Ultimate 64-bit, a tuner TV of SiliconDust HD Homerun networked and a videocard ATI Radeon 4550. I have all the latest updates.

    I found and tried many recommendations of the Internet for problems like this, and none helped.

    The video card driver is the latest provided by ATI to Microsoft for Windows Update and is dated from 19/04/2011. I tried to install the latest Catalyst software and driver from the ATI site, which does nothing to help, and then uninstalled. These drivers provide no option to adjust the hardware acceleration.

    I had an older version of K-Lite codec package installed. The problem does not change if I have the old version, the last 32 + 64 bit version or no version installed.

    In Control Panel, I tried to disable Windows 7 media, reset their reactivation components and reboot again. There is nothing.

    I had an older version of installed package from Cyberlink. The problem remains the same if I have the old version, the version the most recent or any installed.

    I tried to uninstall all Apple software: QuickTime, iTunes, etc. There is nothing to help.

    I tried to create a new user account; same problem there.

    I have VMware and a virtual machine that is running 64-bit Windows 7 Professional. In this machine, I can view DVD normally with Windows Media Player, using the same physical DVD drive. I don't have Media Center set up in this machine.

    Title photo: original No. in Media Center and Media Player

    The problem is now resolved. I removed the software installed probably because the problem started, and Cisco Webex, which I did not need, was probably the culprit, although I'm not 100% sure.

    Thanks to those who have tried to help.

  • How can I exit full screen when I run Google chrome Windows 8?

    Since I've upgraded to Windows 8 Google Chrome displays full-screen.

    1. click on the button 'Customize and control' at the top right of the browser Google chrome.

    2. Select "restart the chrome on the desktop.

  • Blue screen when you try to install Windows XP on Intel ThinkPad Edge 520

    Hello

    I have a ThinkPad Edge 520 type 1143-B5G with a clean disk and I need to install Windows XP on it, for reasons of inheritance. I read on the pilot of the technology Intel Rapid store being necessary, but this seems not to apply to the 520, only to 220 and 420. The recommended settings are not available on the 520 (nor is the driver itself), and the driver is listed by n/a for the 520 in the list of drivers of Lenovo. But, I always get a BSOD error just as Windows is starting from the installation DVD, after the DVD instructed all pilots, he can think about.

    Anyone know how to fix this?

    Would BTW - be possible to install XP in a separate partition, main alongside Windows 7, on a drive that already has Windows 7 on it? Or a clean disk is needed for this?

    Kind regards

    / EvA

    Hello and welcome,

    What settings are you looking for?  It seems that there is a problem with the mode of operation of HD.  The E520 BIOS has an option to change the SATA compatibility instead of AHCI mode?  You will not be able to install a version of "Vanilla" of XP without adding the correct AHCI driver or compatibility mode.

    What version of BIOS do you have?  I see this rather cryptic reference in the BIOS 1.20:

    "[Fixes problem] problem reading/writing data to the SATA compatibility mode."

    It is possible to dual-boot XP and 7, but the best way to do is to install XP first and then let the 7 Installer put in place the configuration dual-boot.  You would still have the problem of compatibility (IDE) vs AHCI mode.

    Ah, lookinng a little further, there is a driver AHCI for XP in Lenovo driver matrix.  The readme file includes instructions on installation.

    Intel SATA controller AHCI Driver for Windows

    Readme for Intel SATA controller AHCI Driver for Windows

    Maybe you get.

    Z.

  • I get a screen when you start the computer.

    Hello

    How are you?

    Recently, my system hung up and had to do a force restart. I get a screen when starting my computer with few options. I have to click ESC several times to get rid of the screen. This was not an option before. When I start my computer it used to start normally. How to get rid of the screen? Please advice.

    Photo I took of my mobile is attached.

    Windows 7

    AMD athlon

    Auto system

    Thank you

    Gershom

    Hi all

    Thank you for the support.

    I solved the problem by unplugging the cable from the hard drive inside the CPU and connected again. All is well now.

    If the system is not the start or make obstruction to the start-up stage, you can try the same thing.

    All the best.

    Thanks again John and Gerry.

    Surya Kumar

  • Refresh the screen when he became first on the stack

    Hello

    I have a Refresh function on my home screen, from the home screen, a user can change the options in the options screen. However to change the options will change the content on the home screen. How can I update the home screen when a user comes to change options? I thought it would update when it is first on the stack again because it would mean that the option screen has been removed from the battery... Any guidance would be appreciated!

    Thank you

    Ben

    As onExposed() is called in other circumstances, when a refresh is not necessary, I wouldn't recommend you do without some sort of filter to determine whether or not you should.  Review the Thread I pointed you to, in there, I suggest a suitable filter, you could use.  .

  • closing the window BACK to exec system

    Hi, I used the exec.vi system to run a program, wait for the program to end and then run it again with slightly different input parameters. This occurred hundreds of times and works OK except sometimes the program crashes and the DOS window is just sitting there until you manually close.

    To stop I want to detect how long the program will run for and if it is more than 5 minutes, force it to close.

    Detection of how long the programme is for is not a problem, but I don't know how to force the window to close LabVIEW...

    can anyone help?

    Thank you

    Philippe

    Try:

    Taskkill /f /im wmplayer.exe

  • How can I force an image to open completely on the screen in action?

    In PS CS5 when I open an image with height in the range of 1405-1411 or 1873-1882, the image opens half of the bottom of the screen.  Width opts seem to matter.

    I guess it's a bug, but until it is fixed, I'm trying to work around.

    For manual fitting the vertical adjustment button or zoom out screen causes the image to the screen lights up but neither of these options will save in an action to display.

    When an image is opened halfway off the screen, Place a command place precisely for these images.  So an action that includes a place does not work for these images.

    So either I want to find an arrangement (Nothing in preferences that I can find) to force the image open to the screen, or find a command that runs in an action that activates the picture to come on the screen, while not interefering with images that open normally.

    You can use Insert a Menu item (the Launcher to the Panel menu actions) to record something like view > fit to the screen, but what you describe should not be the case.

    You are using tabs or floating documents?

    Have you tried resetting preferences cs5?

    http://forums.Adobe.com/thread/375776?TSTART=0

    Maybe you could post a screenshot showing how the image opens.

Maybe you are looking for