Detect Screen Resolution

Hello, I am a newbie and would appreciate help from all the
helpful people on this forum.
I am creating a site with Dreamweaver but having problems
with screen resolution. I need help with a script that would detect
the screen resolution and load an alternative CSS that would also
change the font. I found several scripts on the internet but none
would work. Can someone help me with this? I found this script but
I am sure I am missing something why it is not working for me. I
spent 2 days trying to make it work and now I feel like I am
loosing my mind. Here is the script
function styleSwitcher(){
var theStyleLink = document.getElementById('styleSwitch');
if (window.innerWidth < 810){
theStyleLink.setAttribute("href","CSS/LowResAdjust.css");
else {
theStyleLink.setAttribute("href","styles_main.css");
What am I **** wrong?
Thanks in advance.
Tinaval

> What am I **** wrong?
Worrying about screen resolution. It's meaningless. What
matters is the
browser's viewport dimensions and that is unpredictable. Best
to design for
a set width (I usually use 780px) or create a fluid layout
(generally I hate
them).
Walt
"Tinaval" <[email protected]> wrote in
message
news:ff1dtn$sdc$[email protected]..
> Hello, I am a newbie and would appreciate help from all
the helpful
> people on
> this forum.
>
> I am creating a site with Dreamweaver but having
problems with screen
> resolution. I need help with a script that would detect
the screen
> resolution
> and load an alternative CSS that would also change the
font. I found
> several
> scripts on the internet but none would work. Can someone
help me with
> this?
> I found this script but I am sure I am missing something
why it is not
> working
> for me. I spent 2 days trying to make it work and now I
feel like I am
> loosing
> my mind. Here is the script
>
> function styleSwitcher(){
> var theStyleLink =
document.getElementById('styleSwitch');
>
> if (window.innerWidth < 810){
>
theStyleLink.setAttribute("href","CSS/LowResAdjust.css");
>
> }
> else {
> theStyleLink.setAttribute("href","styles_main.css");
>
> }
> }
>
> What am I **** wrong?
>
> Thanks in advance.
> Tinaval
>

Similar Messages

  • Auto-Detect Screen Resolution Does Not Work Across Multiple Monitors With Different Resolutions

    Hi,
    The Acrobat Pro DC (15.007.20033.2203) auto-detect screen resolution feature does not work with multiple monitors at different resolutions.  Acrobat looks fine on my hidpi primary laptop display (Razr 14" 2014) but is completely unusable if I drag or extend the application to a standard HD resolution secondary monitor. Dragging Acrobat from my primary desktop display to the secondary display causes the UI elements to become 2x as large as they should be and makes Acrobat unusable. 
    Is there a way to make Acrobat auto-detect the display that it is currently on? 
    Thanks!
    -Donald

    To prevent it from happing again, you can
    1. go to the Mouse preference and turn off the scroll zoom feature.
    2. go to the Universal Access preference and disable the zoom features.

  • [SOLVED]Screen resolution began to be incorrectly detected

    After installing some packages not having obvious relations to video issues (mysql and zfs related packages), the screen resolution on my 1280x1024 screen began to be set as 1024x768 without 1280x1024 in the list of possible modes. I tried to X -configure but to no avail. Reinstalling xorg-server also didn't help. I tried to manually detect and add 1280x1024 mode with xrandr, this mode began to appear in the modes list, but the resolution remains 1024x768 when it's selected.
    I have an ancient SiS videocard, but  it worked OK with the standard vesa driver.
    What can be the cause of this issue and how it could be corrected?
    Some fragments of Xorg log:
    [ 769.623] (II) VESA(0): Total Memory: 512 64KB banks (32768kB)
    [ 769.623] (II) VESA(0): Monitor0: Using default hsync range of 31.50-48.00 kHz
    [ 769.623] (II) VESA(0): Monitor0: Using default vrefresh range of 50.00-70.00 Hz
    [ 769.623] (II) VESA(0): Monitor0: Using default maximum pixel clock of 65.00 MHz
    [ 769.623] (WW) VESA(0): Unable to estimate virtual size
    [ 769.623] (II) VESA(0): Not using built-in mode "1600x1200" (no mode of this name)
    [ 769.623] (II) VESA(0): Not using built-in mode "1280x1024" (no mode of this name)
    [ 769.623] (II) VESA(0): Not using built-in mode "1024x768" (no mode of this name)
    [ 769.623] (II) VESA(0): Not using built-in mode "800x600" (no mode of this name)
    [ 769.623] (II) VESA(0): Not using built-in mode "640x480" (no mode of this name)
    [ 769.623] (WW) VESA(0): No valid modes left. Trying less strict filter...
    [ 769.623] (II) VESA(0): Monitor0: Using hsync range of 31.50-48.00 kHz
    [ 769.623] (II) VESA(0): Monitor0: Using vrefresh range of 50.00-70.00 Hz
    [ 769.623] (II) VESA(0): Monitor0: Using maximum pixel clock of 65.00 MHz
    [ 769.623] (WW) VESA(0): Unable to estimate virtual size
    [ 769.623] (II) VESA(0): Not using built-in mode "1600x1200" (hsync out of range)
    [ 769.623] (II) VESA(0): Not using built-in mode "1280x1024" (hsync out of range)
    [ 769.623] (--) VESA(0): Virtual size is 1024x768 (pitch 1024)
    [ 769.623] (**) VESA(0): *Built-in mode "1024x768"
    [ 769.623] (**) VESA(0): *Built-in mode "800x600"
    [ 769.623] (**) VESA(0): *Built-in mode "640x480"
    [ 769.623] (==) VESA(0): DPI set to (96, 96)
    [ 769.623] (II) VESA(0): Attempting to use 60Hz refresh for mode "1024x768" (118)
    [ 769.624] (II) VESA(0): Attempting to use 60Hz refresh for mode "800x600" (115)
    [ 769.624] (II) VESA(0): Attempting to use 60Hz refresh for mode "640x480" (112)
    // Another fragment:
    [ 769.384] (II) LoadModule: "glx"
    [ 769.384] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
    [ 769.392] (II) Module glx: vendor="X.Org Foundation"
    [ 769.392] compiled for 1.16.0, module version = 1.0.0
    [ 769.392] ABI class: X.Org Server Extension, version 8.0
    [ 769.392] (==) AIGLX enabled
    [ 769.392] (II) LoadModule: "vesa"
    [ 769.393] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
    [ 769.395] (II) Module vesa: vendor="X.Org Foundation"
    [ 769.395] compiled for 1.16.0, module version = 2.3.2
    [ 769.395] Module class: X.Org Video Driver
    [ 769.395] ABI class: X.Org Video Driver, version 18.0
    [ 769.395] (II) VESA: driver for VESA chipsets: vesa
    [ 769.395] (++) using VT number 1
    [ 769.395] (--) controlling tty is VT number 1, auto-enabling KeepTty
    [ 769.395] (II) Loading sub module "vbe"
    [ 769.395] (II) LoadModule: "vbe"
    [ 769.396] (II) Loading /usr/lib/xorg/modules/libvbe.so
    [ 769.396] (II) Module vbe: vendor="X.Org Foundation"
    [ 769.396] compiled for 1.16.0, module version = 1.1.0
    [ 769.396] ABI class: X.Org Video Driver, version 18.0
    [ 769.396] (II) Loading sub module "int10"
    [ 769.396] (II) LoadModule: "int10"
    [ 769.398] (II) Loading /usr/lib/xorg/modules/libint10.so
    [ 769.399] (II) Module int10: vendor="X.Org Foundation"
    [ 769.399] compiled for 1.16.0, module version = 1.0.0
    [ 769.399] ABI class: X.Org Video Driver, version 18.0
    [ 769.399] (II) VESA(0): initializing int10
    [ 769.421] (II) VESA(0): Primary V_BIOS segment is: 0xc000
    [ 769.424] (II) VESA(0): VESA BIOS detected
    [ 769.424] (II) VESA(0): VESA VBE Version 3.0
    [ 769.424] (II) VESA(0): VESA VBE Total Mem: 32768 kB
    [ 769.424] (II) VESA(0): VESA VBE OEM: SiS
    [ 769.424] (II) VESA(0): VESA VBE OEM Software Rev: 1.0
    [ 769.424] (II) VESA(0): VESA VBE OEM Vendor: Silicon Integrated Systems Corp.
    [ 769.424] (II) VESA(0): VESA VBE OEM Product: 6330
    [ 769.424] (II) VESA(0): VESA VBE OEM Product Rev: 3.72.10
    [ 769.448] (==) VESA(0): Depth 24, (--) framebuffer bpp 32
    [ 769.448] (==) VESA(0): RGB weight 888
    [ 769.448] (==) VESA(0): Default visual is TrueColor
    [ 769.448] (==) VESA(0): Using gamma correction (1.0, 1.0, 1.0)
    [ 769.448] (II) Loading sub module "ddc"
    [ 769.448] (II) LoadModule: "ddc"
    [ 769.448] (II) Module "ddc" already built-in
    [ 769.533] (II) VESA(0): VESA VBE DDC supported
    [ 769.533] (II) VESA(0): VESA VBE DDC Level none
    [ 769.533] (II) VESA(0): VESA VBE DDC transfer in appr. 0 sec.
    [ 769.576] (II) VESA(0): VESA VBE DDC read failed
    [ 769.576] (II) VESA(0): Searching for matching VESA mode(s):
    Last edited by nbd (2014-08-05 09:17:50)

    I tried the 'xf86-video-sis' from the official repositories, but it didn't work: 'X -configure' outputs that no devices are found.
    The command
    # lspci | grep SiS
    gives the output:
    00:00.0 Host bridge: Silicon Integrated Systems [SiS] 662 Host (rev 01)
    00:01.0 PCI bridge: Silicon Integrated Systems [SiS] AGP Port (virtual PCI-to-PCI bridge)
    00:02.0 ISA bridge: Silicon Integrated Systems [SiS] SiS964 [MuTIOL Media IO] LPC Controller (rev 36)
    00:02.5 IDE interface: Silicon Integrated Systems [SiS] 5513 IDE Controller (rev 01)
    00:02.7 Multimedia audio controller: Silicon Integrated Systems [SiS] SiS7012 AC'97 Sound Controller (rev a0)
    00:03.0 USB controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f)
    00:03.1 USB controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f)
    00:03.2 USB controller: Silicon Integrated Systems [SiS] USB 1.1 Controller (rev 0f)
    00:03.3 USB controller: Silicon Integrated Systems [SiS] USB 2.0 Controller
    00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91)
    00:05.0 IDE interface: Silicon Integrated Systems [SiS] SATA (rev 01)
    00:1f.0 PCI bridge: Silicon Integrated Systems [SiS] PCI-to-PCI bridge
    01:00.0 VGA compatible controller: Silicon Integrated Systems [SiS] 661/741/760 PCI/AGP or 662/761Gx PCIE VGA Display Adapter (rev 04)
    The command 'X -configure' with the 'xf86-video-vesa' driver produces the following xorg.conf file:
    Section "ServerLayout"
    Identifier "X.org Configured"
    Screen 0 "Screen0" 0 0
    InputDevice "Mouse0" "CorePointer"
    InputDevice "Keyboard0" "CoreKeyboard"
    EndSection
    Section "Files"
    ModulePath "/usr/lib/xorg/modules"
    FontPath "/usr/share/fonts/misc/"
    FontPath "/usr/share/fonts/TTF/"
    FontPath "/usr/share/fonts/OTF/"
    FontPath "/usr/share/fonts/Type1/"
    FontPath "/usr/share/fonts/100dpi/"
    FontPath "/usr/share/fonts/75dpi/"
    EndSection
    Section "Module"
    Load "glx"
    EndSection
    Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    EndSection
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "mouse"
    Option "Protocol" "auto"
    Option "Device" "/dev/input/mice"
    Option "ZAxisMapping" "4 5 6 7"
    EndSection
    Section "Monitor"
    Identifier "Monitor0"
    VendorName "Monitor Vendor"
    ModelName "Monitor Model"
    EndSection
    Section "Device"
    ### Available Driver options are:-
    ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
    ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
    ### <percent>: "<f>%"
    ### [arg]: arg optional
    #Option "ShadowFB" # [<bool>]
    #Option "DefaultRefresh" # [<bool>]
    #Option "ModeSetClearScreen" # [<bool>]
    Identifier "Card0"
    Driver "vesa"
    BusID "PCI:1:0:0"
    EndSection
    Section "Screen"
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
    Viewport 0 0
    Depth 1
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 4
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 8
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 15
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    EndSubSection
    EndSection
    The X server is started via startxfce4 in the ~/.xinitrc file:
    #!/bin/sh
    # ~/.xinitrc
    if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
    done
    unset f
    fi
    exec startxfce4
    I tried to use the recommendations about using xrandr. The command
    # cvt 1280 1024
    produces the following:
    # 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
    Modeline "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
    Then I perfrom the following two commands:
    # xrandr --newmode "1280x1024_60.00"  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync
    # xrandr --addmode default "1280x1024_60.00"
    This adds the 1280x1024 mode to the list of available modes in the display control panel, but when
    this mode is selected - nothing happens and the resolution remains the same: 1024x768.
    EDIT:
    I tried all three SiS drivers from the repository: sis, sisusb and sisimedia. In all three cases 'X -configure' failed with an error message: "No devices to configure". The strange thing is that the vesa driver worked OK out of the box. What could cause such a strange problem with the screen resolution?
    EDIT 2:
    The cause of the problem was the cable from the monitor to the computer: it was twisted and apparently was causing some aberrations to the signal. I found out it when added to the xorg.conf file the line HorizSync = 58-61. After adding that line the problem disappeared. I began to think why the things previously have been working OK without that line. And supposed that the matter is in hardware. I straighted out the cable and the problem isn't occuring anymore even without the xorg.conf editings.
    Last edited by nbd (2014-08-04 17:58:13)

  • I was trying to fix my screen resolution and now it's stuck on auto detect cannot display this video mode. I tried another monitor and it still won't show anything. I'm locked out

    I was trying to fix my screen resolution and now it's stuck on auto detect cannot display this video mode. I tried another monitor and it still won't show anything. I'm locked out

    Reset the SMC and PRAM
    Intel-based Macs: Resetting the System Management Controller (SMC)
    About NVRAM and PRAM
    Next try Safe Mode boot and and then normal boot
    OS X: What is Safe Boot, Safe Mode?

  • How can I resize my Flash site to fit any screen resolution?

    I built a 100% flash site with tiled framing but I have a
    problem. My flash was built 766 x 750 pixiels. When viewed at
    resolutions greater than 1024x768 the webpage looks great but
    anything less than that it looks like @#$@. I know most people
    probably view at 1024 x 768. Is there anyway to auto resize based
    up on screen resolution or something to detect the screen size and
    adjust the webpage accordingly.
    www.platlimosvc.com
    Below is my html (index.html) for my flash movie:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    <html>
    <head>
    <title>Untitled</title>
    <meta http-equiv="content-type" content="text/html;
    charset=UTF-8">
    <link href="style.css" rel="stylesheet"
    type="text/css">
    </head>
    <body>
    <table cellpadding="0" cellspacing="0" border="0"
    style="width:100%; height:100%">
    <tr>
    <td valign="top" style="width:100%" height="750">
    <table cellpadding="0" cellspacing="0" border="0"
    width="766" style="height:100% " align="center">
    <tr>
    <td valign="top" width="234" style="height:750px ">
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swfl
    ash.cab#version=6,0,29,0" width="766" height="750">
    <param name="movie" value="flash/xxxx_main.swf">
    <param name="quality" value="high">
    <param name="menu" value="false">
    <!--[if !IE]> <-->
    <object data="flash/xxxx_main.swf"
    width="766" height="750"
    type="application/x-shockwave-flash">
    <param name="quality" value="high">
    <param name="menu" value="false">
    <param name="pluginurl" value="
    http://www.macromedia.com/go/getflashplayer">
    FAIL (the browser should render some flash content, not
    this).
    </object>
    <!--> <![endif]-->
    </object>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td valign="top" style="width:100%; height:1px;
    background-color:#6C6C6C">
    <table cellpadding="0" cellspacing="0" border="0"
    style="width:100%; height:1px">
    <tr>
    <td valign="top" style="width:50%;
    height:1px"></td>
    <td valign="top" style="width:766; height:1px">
    <table cellpadding="0" cellspacing="0" border="0"
    width="766" style="height:1px ">
    <tr>
    <td valign="top" width="766" style="height:1px
    "></td>
    </tr>
    </table>
    </td>
    <td valign="top" style="width:50%;
    height:1px"></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td valign="top" style="width:100%; height:100%">
    <table cellpadding="0" cellspacing="0" border="0"
    style="width:100%; height:100%">
    <tr>
    <td valign="top" style="width:50%;
    background:url(images/bottom-3.gif) top right;
    height:100%"></td>
    <td valign="top" style="width:766;
    background-image:url(images/bottom-5.gif); height:100%">
    <table cellpadding="0" cellspacing="0" border="0"
    width="766" style="height:100% ">
    <tr>
    <td valign="top" width="766" style="height:100%
    "></td>
    </tr>
    </table>
    </td>
    <td valign="top" style="width:50%;
    background:url(images/bottom-4.gif) top left;
    height:100%"></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>

    tlcarl,
    > I know most people probably view at 1024 x 768.
    You think so? Even if they have their resolution that high
    (which is
    fairly standard, nowadays), do you think most people maximize
    their browsers
    to fill that whole area?
    > Is there anyway to auto resize based up on screen
    > resolution or something to detect the screen size and
    > adjust the webpage accordingly.
    There is, indeed. :) Check out the Stage.onResize event in
    the
    ActionScript 2.0 Language Reference. That event is dispatched
    when the
    browser (or whatever container) is resized -- in cases where
    the SWF is
    embedded with percentages. If that's your aim, you'll need to
    code against
    that event, which can be done like this ...
    http://www.quip.net/blog/2006/flash/how-to-position-movie-clips-browser-resizing
    It can take a bit of thought, depending on the complexity of
    your goal,
    but the result is usually worth it. The site in your URL is
    already built,
    so this wouldn't do much of anything without opening the
    hood, so to speak,
    and completely rebuilding the engine. A Flash movie has to be
    designed and
    programmed to respond to the Stage.onResize event.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Screen resolution when PXE boot from WDS vs Install Windows 8.1 from USB

    Hi all
    I own a Lenovo ThinkPad T430s, X230 Tablet, and now have my hands on a T440. All three machines have UEFI Secure Boot enabled properly, i.e. Windows boot screen shows Lenovo logo instead of Windows logo.
    However, if I do a PXE boot (using Windows Deployment Services from Windows Server 2012, not R2) and boot to the same boot.wim provided on a Windows 8.1 ISO image, the boot screen resolution turns crap, and the WinPE environment runs in 640x480. Also, as opposed
    to the Lenovo logo showing on the boot screen, the Windows logo shows up instead, indicating it's not doing a secure boot?
    When booting from a USB stick however, using the same Windows 8.1 boot.wim (copied from ISO), the screen resolution in Windows Setup is detected correctly, and the Lenovo logo shows up.
    This occurs on all three machines since MDT was upgraded to MDT 2013 or when I replaced Windows 8 boot.wim with Windows 8.1 boot.wim (as the Windows ADK 8 --> ADK 8.1).
    Is there a fix for this? Do others have the same problem elsewhere?
    Many thanks 

    Hi,
    When boot UEFI-based computer from PXE you should take more into consideration.
    For some computers, you might have to perform additional steps to make sure that Windows is installed in UEFI mode, and not in legacy BIOS-compatibility mode.
    Some computers might support UEFI. However, they do not support a PXE-initiated boot when in UEFI mode.
    How to Create a PXE-Initiated Windows 8 Deployment for UEFI-Based or BIOS-Based Computers in Configuration Manager
    http://technet.microsoft.com/en-us/library/jj938037.aspx
    Especially for “Pre-Deployment Considerations”
    If you still cannot find a way to make it boot from UEFI mode, you should contact with manufacture to confirm if PXE-initiated boot is supported.
    Hope this helps.

  • Screen Resolutions in OSX 10.8

    Maybe someone can help, but if not - Apple, please sort this out, I've read complaints all over the net going back years...
    Screen Resolutions. This isn't difficult Apple. The video card in my 2008 Mac Pro (a geforce somethignorother) can display all manner of resolutions - pretty much anything under 25**x1*** (whatever that res is) is supported. I know this because nvidia state as much on their website, and also because every single video card since the beginning of time (which, for me and computers, was circa 1996) can do it.
    So why, when I connect a 24" Acer LCD screen (with a native resolution of 1920x1200) via VGA (vga because it's what I've got running under the floor) do the video resolution options in OSX only include 4:3 and 16:9 formats? I don't want 1920x1080. It's pathetic. My 2006 mac pro running 10.5 has no such problem. This 2008 Mac pro had no such problem while running 10.6 a few years ago.
    Here's another example. After giving up with the 24" Acer (being advised to BUY a bit of software to access a resolution is ridiculous), I plugged in my 32" Sony LCD screen, again via VGA. This was interesting. Sony on their website stated that 1360x768 was the highest resolution accessable via VGA, despite the TV supporting 1920x1080 via digital inputs. As soon as OSX detects the TV then surely, 1360x768 is the highest offered resolution. But, if I boot the computer without the TV being on, then switch the TV on, I can set it to 1920x1080, and all is well. Work that one out Sony. A combination of Sony trying to limit their cheap tvs, and Apple interfering.
    Anyway, my basic argument and complaint is this: I hate little more than computers that think they're smarter than the user. Even if we disgard the Sony example (which is doubtless a line of code written in the TV, rather than a technical limitation (as I own the 37" version of the TV, and it works at 1080p via VGA no probs - doubt they've engineered two different VGA circuits...)) - there is no excuse for OSX wrongly detecting a screen and displaying incorrect resolutions. Have an idiot mode by all means, but let me adjust the resolution beyond that. Give me access to all resolutions at all times.

    Apple doesn't routinely monitor these discussions.
    Send Apple feedback. They won't answer, but at least will know there is a problem. If enough people send feedback, it may get the problem solved sooner.
    Feedback
    Or you can use your Apple ID to register with this site and go the Apple BugReporter. Supposedly you will get an answer if you submit feedback.
    Feedback via Apple Developer

  • How do I develop for multiple screen resolutions using Adobe Air

    Hi,
    I'm looking at developing mobile apps using Adobe Air but there's something I'm not quite sure. Sorry if this is a newbie question or has been repeated but I have looked at tutorials, etc but just want to get a general idea on how to prepare the assets. Here are some of my questions:-
    1) If I want to develop for the iPhone non-retina and retina resolution, do I actually need to only write the code and layout the graphics in retina(960 x 640) stage size and it will automatically scale down for non-retina resolution?
    2) How do I cater for iPhone 5 resolution? Do I actually need to swap say the background images through code by detecting the resolution size it was in? or do I actually just leave the background image longer it exceeds the stage height so when it's iPhone 5 it will show everything?
    thanks for the help!

    If you are talking about regular Flash work, and not your own code-layout application, then what happens depends on the scale mode of the stage. Typically, when doing code layout the stage is set to no_scale, and you have to do all the hard work yourself, calculating the size of things, and laying them out with ActionScript.
    If it's more of a typical Flash graphical scene there are two other scale modes that make life easier for you.
    The default scale mode is show_all. With that you will be certain to see all of the content of your original Flash stage, and if the screen is a wider ratio than your stage, the content that is off the sides of the stage will be revealed. See this app I made, that uses that technique:
    https://itunes.apple.com/us/app/meet-heckerty-funny-interactive/id514220257?mt=8
    It works well enough, I have enough extra background graphics to go out to a 16:9 screen, including iPhone 5. That particular stage is 1024x768, and it will scale all the way from iPad 3 Retina down to iPhone 3gs.
    The other scale mode that is useful is no_border. In that mode you are certain to not have any black borders around the stage. It achieves that by cropping into either the left and right, or the top and bottom, of the stage. See these apps I made, that work that way:
    https://itunes.apple.com/us/app/milkshake-mayhem/id556962979?mt=8
    https://itunes.apple.com/us/app/p.s.-snowflake-yourself/id571384475?mt=8
    In both of those cases I have content that is correct for half way between the ratio limits of 16:9 and 4:3 (or 9:16 and 3:4 for the portrait case). When the app runs on your device, some amount of the left and right, or the top and bottom, of the stage is cropped. I have enough background content for that to be ok, and all of the important content is within the middle 14:9 or 9:14 area of the screen. The stage size for the landscape app is 1680xx1080, exactly 14:9. This approach is better than the show_all one, in that the user doesn't feel like they are seeing a lot of blank space, as can be the case when viewing a 4:3 stage on a 16:9 screen.
    One last thing, even with either of those techniques the app won't fill the iPhone 5 screen. To get that to work you have to include a splash screen that is 640x1136, and name [email protected]. With that in place iOS knows to make your app use the full width or height of the iPhone 5.

  • |Solved| - Screen resolution and nVidia

    I installed arch, xorg, nvidia's drives, openbox and gnome.
    I can run gnome and openbox without any problem, however, my screen resolution isn't recognised.  Here's my /etc/X11/xorg.conf:
    # nvidia-xconfig: X configuration file generated by nvidia-xconfig
    # nvidia-xconfig: version 1.0 (buildmeister@builder58) Thu Jun 5 00:08:24 PDT 2008
    # File generated by xorgconfig.
    # Copyright 2004 The X.Org Foundation
    # Permission is hereby granted, free of charge, to any person obtaining a
    # copy of this software and associated documentation files (the "Software"),
    # to deal in the Software without restriction, including without limitation
    # the rights to use, copy, modify, merge, publish, distribute, sublicense,
    # and/or sell copies of the Software, and to permit persons to whom the
    # Software is furnished to do so, subject to the following conditions:
    # The above copyright notice and this permission notice shall be included in
    # all copies or substantial portions of the Software.
    # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    # The X.Org Foundation BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
    # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    # SOFTWARE.
    # Except as contained in this notice, the name of The X.Org Foundation shall
    # not be used in advertising or otherwise to promote the sale, use or other
    # dealings in this Software without prior written authorization from
    # The X.Org Foundation.
    # Refer to the xorg.conf(5) man page for details about the format of
    # this file.
    # Module section -- this section is used to specify
    # which dynamically loadable modules to load.
    # Files section. This allows default font and rgb paths to be set
    # Server flags section.
    # Input devices
    # Core keyboard's InputDevice section
    # Core Pointer's InputDevice section
    # Other input device sections
    # this is optional and is required only if you
    # are using extended input devices. This is for example only. Refer
    # to the xorg.conf man page for a description of the options.
    # Section "InputDevice"
    # Identifier "Mouse2"
    # Driver "mouse"
    # Option "Protocol" "MouseMan"
    # Option "Device" "/dev/mouse2"
    # EndSection
    # Section "InputDevice"
    # Identifier "spaceball"
    # Driver "magellan"
    # Option "Device" "/dev/cua0"
    # EndSection
    # Section "InputDevice"
    # Identifier "spaceball2"
    # Driver "spaceorb"
    # Option "Device" "/dev/cua0"
    # EndSection
    # Section "InputDevice"
    # Identifier "touchscreen0"
    # Driver "microtouch"
    # Option "Device" "/dev/ttyS0"
    # Option "MinX" "1412"
    # Option "MaxX" "15184"
    # Option "MinY" "15372"
    # Option "MaxY" "1230"
    # Option "ScreenNumber" "0"
    # Option "ReportingMode" "Scaled"
    # Option "ButtonNumber" "1"
    # Option "SendCoreEvents"
    # EndSection
    # Section "InputDevice"
    # Identifier "touchscreen1"
    # Driver "elo2300"
    # Option "Device" "/dev/ttyS0"
    # Option "MinX" "231"
    # Option "MaxX" "3868"
    # Option "MinY" "3858"
    # Option "MaxY" "272"
    # Option "ScreenNumber" "0"
    # Option "ReportingMode" "Scaled"
    # Option "ButtonThreshold" "17"
    # Option "ButtonNumber" "1"
    # Option "SendCoreEvents"
    # EndSection
    # Monitor section
    # Any number of monitor sections may be present
    # Graphics device section
    # Any number of graphics device sections may be present
    # Standard VGA Device:
    # Device configured by xorgconfig:
    # Screen sections
    # Any number of screen sections may be present. Each describes
    # the configuration of a single screen. A single specific screen section
    # may be specified from the X server command line with the "-screen"
    # option.
    # ServerLayout sections.
    # Any number of ServerLayout sections may be present. Each describes
    # the way multiple screens are organised. A specific ServerLayout
    # section may be specified from the X server command line with the
    # "-layout" option. In the absence of this, the first section is used.
    # When now ServerLayout section is present, the first Screen section
    # is used alone.
    # Section "DRI"
    # Mode 0666
    # EndSection
    Section "ServerLayout"
    # The Identifier line must be present
    # Each Screen line specifies a Screen section name, and optionally
    # the relative position of other screens. The four names after
    # primary screen name are the screens to the top, bottom, left and right
    # of the primary screen. In this example, screen 2 is located to the
    # right of screen 1.
    # Each InputDevice line specifies an InputDevice section name and
    # optionally some options to specify the way the device is to be
    # used. Those options include "CorePointer", "CoreKeyboard" and
    # "SendCoreEvents".
    Identifier "Simple Layout"
    Screen "Screen 1" 0 0
    InputDevice "Mouse1" "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"
    EndSection
    Section "Files"
    # The location of the RGB database. Note, this is the name of the
    # file minus the extension (like ".txt" or ".db"). There is normally
    # no need to change the default.
    # RgbPath "/usr/share/X11/rgb"
    # Multiple FontPath entries are allowed (which are concatenated together),
    # as well as specifying multiple comma-separated entries in one FontPath
    # command (or a combination of both methods)
    # FontPath "/usr/share/fonts/TTF"
    # FontPath "/usr/share/fonts/Type1"
    # FontPath "/usr/lib/X11/fonts/local/"
    # FontPath "/usr/lib/X11/fonts/misc/"
    # FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
    # FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
    # FontPath "/usr/lib/X11/fonts/Speedo/"
    # FontPath "/usr/lib/X11/fonts/Type1/"
    # FontPath "/usr/lib/X11/fonts/TrueType/"
    # FontPath "/usr/lib/X11/fonts/freefont/"
    # FontPath "/usr/lib/X11/fonts/75dpi/"
    # FontPath "/usr/lib/X11/fonts/100dpi/"
    # The module search path. The default path is shown here.
    # ModulePath "/usr/lib/modules"
    FontPath "/usr/share/fonts/misc"
    FontPath "/usr/share/fonts/100dpi:unscaled"
    FontPath "/usr/share/fonts/75dpi:unscaled"
    EndSection
    Section "Module"
    # This loads the DBE extension module.
    # This loads the miscellaneous extensions module, and disables
    # initialisation of the XFree86-DGA extension within that module.
    # This loads the font modules
    # Load "type1"
    # This loads the GLX module
    # Load "glx"
    # This loads the DRI module
    # Load "dri"
    Load "dbe" # Double buffer extension
    SubSection "extmod"
    Option "omit xfree86-dga" # don't initialise the DGA extension
    EndSubSection
    Load "freetype"
    # Load "xtt"
    Load "glx"
    EndSection
    Section "InputDevice"
    # Option "Xleds" "1 2 3"
    # Option "LeftAlt" "Meta"
    # Option "RightAlt" "ModeShift"
    # To customise the XKB settings to suit your keyboard, modify the
    # lines below (which are the defaults). For example, for a non-U.S.
    # keyboard, you will probably want to use:
    # Option "XkbModel" "pc105"
    # If you have a US Microsoft Natural keyboard, you can use:
    # Option "XkbModel" "microsoft"
    # Then to change the language, change the Layout setting.
    # For example, a german layout can be obtained with:
    # Option "XkbLayout" "de"
    # or:
    # Option "XkbLayout" "de"
    # Option "XkbVariant" "nodeadkeys"
    # If you'd like to switch the positions of your capslock and
    # control keys, use:
    # Option "XkbOptions" "ctrl:swapcaps"
    # These are the default XKB settings for Xorg
    # Option "XkbRules" "xorg"
    # Option "XkbModel" "pc105"
    # Option "XkbLayout" "us"
    # Option "XkbVariant" ""
    # Option "XkbOptions" ""
    # Option "XkbDisable"
    Identifier "Keyboard1"
    Driver "kbd"
    Option "AutoRepeat" "500 30"
    # Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
    Option "XkbRules" "xorg"
    Option "XkbModel" "logicd"
    Option "XkbLayout" "pt"
    Option "XkbVariant" "pt"
    EndSection
    Section "InputDevice"
    # Identifier and driver
    # Option "Resolution" "256"
    # Baudrate and SampleRate are only for some Logitech mice. In
    # almost every case these lines should be omitted.
    # Option "BaudRate" "9600"
    # Option "SampleRate" "150"
    # Mouse wheel mapping. Default is to map vertical wheel to buttons 4 & 5,
    # horizontal wheel to buttons 6 & 7. Change if your mouse has more than
    # 3 buttons and you need to map the wheel to different button ids to avoid
    # conflicts.
    # Emulate3Timeout is the timeout in milliseconds (default is 50ms)
    # Option "Emulate3Buttons"
    # Option "Emulate3Timeout" "50"
    # ChordMiddle is an option for some 3-button Logitech mice
    # Option "ChordMiddle"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "Auto" # Auto detect
    Option "Device" "/dev/input/mice"
    # Mouse-speed setting for PS/2 mouse.
    Option "ZAxisMapping" "4 5 6 7"
    # Emulate3Buttons is an option for 2-button mice
    EndSection
    Section "Monitor"
    # HorizSync is in kHz unless units are specified.
    # HorizSync may be a comma separated list of discrete values, or a
    # comma separated list of ranges of values.
    # NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
    # USER MANUAL FOR THE CORRECT NUMBERS.
    # HorizSync 30-64 # multisync
    # HorizSync 31.5, 35.2 # multiple fixed sync frequencies
    # HorizSync 15-25, 30-50 # multiple ranges of sync frequencies
    # VertRefresh is in Hz unless units are specified.
    # VertRefresh may be a comma separated list of discrete values, or a
    # comma separated list of ranges of values.
    # NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S
    # USER MANUAL FOR THE CORRECT NUMBERS.
    Identifier "My Monitor"
    HorizSync 80.0 - 80.0
    VertRefresh 75.0
    EndSection
    Section "Device"
    # The chipset line is optional in most cases. It can be used to override
    # the driver's chipset detection, and should not normally be specified.
    # Chipset "generic"
    # The Driver line must be present. When using run-time loadable driver
    # modules, this line instructs the server to load the specified driver
    # module. Even when not using loadable driver modules, this line
    # indicates which driver should interpret the information in this section.
    # The BusID line is used to specify which of possibly multiple devices
    # this section is intended for. When this line isn't present, a device
    # section can only match up with the primary video device. For PCI
    # devices a line like the following could be used. This line should not
    # normally be included unless there is more than one video device
    # intalled.
    # BusID "PCI:0:10:0"
    # VideoRam 256
    # Clocks 25.2 28.3
    Identifier "Standard VGA"
    Driver "nvidia"
    VendorName "Unknown"
    BoardName "Unknown"
    EndSection
    Section "Device"
    # unsupported card
    #VideoRam 319488
    # Insert Clocks lines here if appropriate
    Identifier "My Video Card"
    Driver "nvidia"
    EndSection
    Section "Screen"
    Identifier "Screen 1"
    Device "My Video Card"
    Monitor "My Monitor"
    DefaultDepth 24
    SubSection "Display"
    Viewport 0 0
    Depth 8
    Modes "1440x900"
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 16
    Modes "1440x900"
    EndSubSection
    SubSection "Display"
    Viewport 0 0
    Depth 24
    Modes "1440x900"
    EndSubSection
    EndSection
    If I run "xorgconfig" and after that "nvidia-xconfig", my screen resolution is 1024x860, but after changed very mode to my native resolution ("1440x900"),  is changes to "800x600".
    Last edited by Nomearod (2008-07-23 09:19:07)

    heleos wrote:
    Widescreen resolutions are not possible with newest vista and linux drivers if the tft is connected with dvi.
    Use an older driver or the vga-port instead.
    There are maybe some hacks, but I tried many times in vista and linux. And it's always the same, only 1280x1024.
    did some googling:
    http://forums.nvidia.com/lofiversion/in … 20005.html
    Thanks for the reply, but I don't believe that's the problem since that topic is from 2006 and I didn't had any problems last time I instaled arch (3 months ago).

  • 1280x800 screen resolution is missing...

    Hello. I just purchased a Mac Mini, and I'm using it without a monitor attached. Instead, we use it as a media server in our house, and we access it using a remote connection (Chicken of the VLC).
    Unfortunately, I cannot get the Mac Mini's screen size to match my Macbook Pro, which is requiring painfully annoying scrolling in the virtual window. I can't change the Mac Mini's screen resolution to 1280x800, because that option is not available. How can I add that resolution to the list of possible options without a physical monitor attached?
    I've looked at DisplayConfigX and SwitchResX but neither will do the trick without a monitor attached. Anyone have any ideas?

    Unfortunately I am pretty certain that the resolution list used for headless configurations resides in firmware somewhere, not a normal file in the OS X file system. As such, it can't be written to with programs like DCX and SRX. This question comes up occasionally on this forum and I have never seen a good answer for it.
    All you really need is for the mini to see a valid display ID. That can be done with something like a DVI Detective from Gefen, but that's an expensive way to go. I you have an old, broken monitor, you could rip out the interface board and hang it off the mini's video port. With many such boards the EDID circuit block will take power from the auxiliary power pin on the video cable so the board wouldn't need a power supply of its own in order to power up the EDID and comm channel. That's also a heavy hammer solution but could be cheaper if you can get a broken monitor for free somewhere.

  • Screen Resolution change

    Is there any OSX key combo I can use to change the screen resolution?
    I changed the resolution up to try it - my monitor couldn't handle it. Waited for it to ask me to confirm, and then flip back, but it didn't. Restarted my computer, but it still seems to be kicking out the signal at the too-high resolution, which won't display.
    I can't see the screen sufficiently clearly to navigate into System Preferences. Can anyone assist?

    Hmm, that should have worked since that's the file which holds both your screen resolution and profile information. You may have accidentally chosen a refresh rate that your monitor can't handle.
    Start up once again in Safe Mode. Go into the System Preferences and click the Displays icon. Click the "Detect Displays" button. Select any resolution you know will work. Make sure it's not the same as the current choice to force OS X to write the information back to disk.
    Close the System Preferences and restart normally.

  • Default Screen Resolution 15"

    What is the default screen resolution for a macbook 15"? I have found that people say 1440x900 but that is not even an option on my computer. Also, my icons on my desktop are miniature. How do I fix that? My screen resolution was fine until I plugged in a doppler, then my screen zoomed in and when I tried to fix it and then unplugged it, it's all messed up.
    Thanks in advance

    It might help in Display preferences if you click on Detect Displays first.
    To change the size of desktop icons:
    Ctrl-click on a clear part of the desktop background.
    Select Show View Options.
    Set the icon size, etc to your personal taste.
    Bob

  • 24" Alum iMac screen resolutions

    Is there any way to change the screen resolution to 1600x1000 on the new 24" imacs? There are several other options on the display preferences but not this one. Anything other than the native is too fuzzy and the native 1920x1200 makes everything on the screen to way small to see from a safe distance..and I do wear glasses! It does put a lot of strain in my eyes.I know I can increase the size of the icons and text, but the Adobe pallets and other content is just too small. It shows up on my 23" cinema display with Mac Pro.

    oskar10 wrote:
    I know it is not crystal clear as native, but it does not look bad at all on my 23" cinema display. Why can't I set my imac to this resolution?
    It's more than likely (I could be wrong) monitor based?
    Let's use windows for an example. I have 2 monitors, both supporting different resolutions, the graphics card supports dozens of combinations but monitor 1 only supports certain ones, and monitor 2 only supports certain ones.
    I plug in monitor 1 on my windows pc (using windows as an example) and I can set to all these widescreen resolutions. I plug in monitor 2 and the only resolutions I get are some widescreen and most of them non-widescreen.
    The iMac display may only support certain types which is being detected by the OS and those are the only given options you have.
    The cinema display is recognized as supporting other resolutions and thus THOSE are displayed as options.

  • Screen-resolution resize

    Hi,
    Since I have Leopard my screen-resolution always resize after my pc is coming back from the screensaver or hibernate-mode. Also when I afterwards go to the screen properties my default screen-resolution (1440x900) is not listed and I have to detect screens and he automatically set everything right, but thit is not very handy.
    Thx in advance,
    Regards

    reset [PRAM|http://support.apple.com/kb/HT1379] and [SMC|http://support.apple.com/kb/HT1411].

  • Images: Different screen resolutions, howto ...?

    As you might know, there are several screen resolutions, used by different devices (iPhone 3G/3GS/4, iPad).  You might take a look at: http://stackoverflow.com/questions/2993006/designing-for-varying-mobile-device-resolutions -i-e-iphone-4-iphone-3g  An example: If i would like to build a generic app, with optimized images for the iPhone 3G/3GS, 4 and iPad, how can i implement the images within my application with the use of different screen resolutions (dpi). 3G: image_low_res.jpg, 4: image_high_res.jpg etc.  Is there a better overview for iOS devices showing the exact resolution (dpi)?

    In objectiveC/XCode, you would have two images - one at standard size, and one at double resolution for the retina display. The double-resultion image has a '@2x' suffix just before extension. The OS automaticallt uses the correct image depending on the type of phone (i.e. it uses the @2x image on the iPhone4, and the original image everywhere else).
    Of course this doesn't help us in Flash.  I don't think Adobe have built this feature in to the packager?
    Perhaps a good way to achieve the same results is to have the application detect the phone type on startup/constructor by checking the screen size (Capabilities.screenResolutionX/Y).  Then, whenever you need a screen coordinate, distance or an image, you have a custom class (probably static methods) that you ask for this information.
    It seems like a lot of work, but if you are really keen on supporting the retina display, this is probably your best bet!
    Psuedo code:
    // Two images in the library
    // spriteA.png
    // [email protected]
    // All my coordinates are measured in original iPhone coords (320x480)
    // I am now asking for a point in the middle of the screen
    // If I am on iPhone4, the resulting point will be (320,480)
    // If I am on iPhone, the resulting point will be (160,240)
    var p : Point = ResHandler.createPoint( 160, 240 );
    // Now I grab my bitmap
    // If I am on iPhone, the resulting bitmap will be spriteA.png
    // If I am on iPhone4, the resulting bitmap will be [email protected]
    var b : Bitmap = ResHandler.createBitmap( 'spriteA' );
    // Now place the bitmap
    b.x = p.x;
    b.y = p.y;
    addChild( b );
    // Now move the bitmap by 100 pixels.
    // If I am on iPhone the resulting distance will be 100 pixels
    // If I am on iPhone4, the resulting distance will be 200 pixels
    var d : Number = ResHandler.getDistance( 100 );
    b.x += d;
    Hope it helps

Maybe you are looking for

  • ICloud Photo Library and Family Sharing

    Does anyone know how the iCloud Photo Library and Family Sharing accounts interact?  I'd rather not have to specify what to share with the rest of the family if I don't have to.

  • A user uploads a new pdf (using Dreamweaver) but still gets the old version back in browser.

    She downloads the file from the site, and gets the old version of the file instead of the one she just uploaded. I tried it myself and everything is done correctly: the new file is on the server but download keeps displaying the old version. Dreamwea

  • Microsoft Word 2012 scam app on store

    I just noticed a "Microsoft Word 2012" app on the app store while browsing AppShopper. I checked it on the store and it is obviously a scam. How did this app even make it to the store? I don't see how an app advertised as "All features of the MAC ver

  • BAPI_ALM_NOTIF_CLOSE issue

    Hi All,            I am using BAPI_ALM_NOTIF_CLOSE to close PM Notification . When I run the BAPI directly I see that the Notification is closed but when I call it in my program, It does not happen. The reason for the above is : In my program I have

  • Changing date and time  format

    Hi all,   I got date and time value as  20051219 and 235959 resp. I want to convert it into standard format that is 19.12.2005 and 23:59:59. How should i dothis,or which function module should i used. Thanks and Regards, Sugeet.