Resizing html components based on monitor resolution
I have an AIR app that runs in full screen mode continuously as a kiosk. However when it is installed on computers with low resolution monitors, some of the components get chopped off and even worse, the borders sometimes only display on three sides due to these clipping issues. How can I avoid this. The components in question are html components and the app essentially flips through a series of web pages, reloading them after each iteration.
Here's a sample of a component:
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" clipContent="true" backgroundAlpha="0"
horizontalScrollPolicy="off" verticalScrollPolicy="off" hideEffect="Fade" showEffect="Fade"
horizontalAlign="center" verticalAlign="middle" id="pan1" >
<mx:HTML styleName="effectBox" verticalScrollPolicy="off" id="html1" location="http://mydomain.com/index.html"/>
</mx:VBox>
// style:
.effectBox {
borderColor: #000000;
borderThickness: 10;
borderStyle: solid;
cornerRadius: 5;
domWindow is a reference to the HTML page's window object. You use it to access the JavaScript execution context from your ActionScript code.
Out of curiosity, I put together a demo:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import mx.events.FlexEvent;
private var elem;
protected function button1_clickHandler(event:MouseEvent):void
elem.style.zoom = parseInt(elem.style.zoom)10'%';
trace("Zoom: " + elem.style.zoom);
protected function button2_clickHandler(event:MouseEvent):void
elem.style.zoom = parseInt(elem.style.zoom)-10+'%';
trace("Zoom: " + elem.style.zoom);
protected function html_completeHandler(event:Event):void
elem = html.domWindow.document.body;
elem.style.setProperty( "zoom", "100%", "0" );
]]>
</mx:Script>
<mx:Button click="button1_clickHandler(event)" label="Zoom In"/>
<mx:Button click="button2_clickHandler(event)" label="Zoom Out"/>
<mx:HTML id="html" location="http://www.adobe.com" complete="html_completeHandler(event)"/>
</mx:WindowedApplication>
I don't know if this will work for your issue or not. There is certainly some funkiness in how the page layout reacts to zooming. Images on the page are still scaled, of course, though text looks better with this technique.
Similar Messages
-
HOW TO RESIZE MONITOR RESOLUTION
Can anyone tell me if i distribute a cd with a projector on
it, is it possible to resize the monitor resolution to 800*600
automatically? and when the projector is closed can i have it
return the monitor back to the owners previous settings??? Or
should i just have a note with disc saying 'best viewed at 800*600.
If it possible to do this in Director Mx can anybody tell me
how?> if i set the projector full screen (800*600), how about
those computer with different resolution.
Fullscreen means your projector will play at whatever stage
size you
have set. The border around the stage will be at the size of
the monitor
resolution (effectively filling the screen - hence the name)
and with
the color of your stage background. Try it and see. -
Code to resize flash content based on screen dimmensions? Already encountered problems.
Ok Guys-
So I have put up a trial of my flash website-
www.nicksdesign.com/flash
I'm new at flash- as this is the first project I've done in
flash, and the problem is...
I put the file in a simple HTML file in dreamweaver, and i
published the files, tested them on my computer, and it's great-
the size fits enough so that no scrolling is needed.
However-
I asked a friend to test it- and on his computer you are
required to scroll both vertically and horizontally in order to see
all the content on the 100% flash website.
My question-
Are there any codes that can resize the swf file or the HTML,
based on screen resolution/browser [however- we tested in the same
browser]
Any help would be SUPER appreciated
Best Regards,
Nick SmithHi Gorka, thanks for your post! Here is my problem in as
small a nutshell as I can manage! The site I'm creating depends a
lot on animation of characters around the screen so this all has to
be done in flash, I drew the Frame of the site in Flash and a lot
of the buttons etc will be flash although I have to use some jpegs
as buttons on the top of the site as well as a lot of other bitmaps
(product shots etc.) in the content welI. I had to reduce them (and
size all the other bitmap elements) in photoshop to exactly the
size they will appear in the content well in flash. Even the jpeg
buttons I created, I had to output two different sized versions of
the same image for each button, as if I enlarge the image even
slightly in flash for a rollover state, it looks awful.. now it
looks great but the resulting swf is huge! My main concern at the
moment as I said, is what way I can output the swf so that it will
fit perfectly into any browser window without having to scroll, and
keep the quality of all the bitmap elements, and the client is also
worried about having huge areas of white space around the frame of
the site. I'm very interested to know more about the 'stage class'
you mentioned, i haven't come across this before, just before I got
your message, I had found a link to this page:
http://forums.ultrashock.com/ff.htm?http://forums.ultrashock.com/forums/showthread.php?s=& threadid=83535
is this what you were talking about? Your offer of help is
greatly appreciated, if you can help me understand what needs to be
done I'll be eternally grateful! Thanks, Eoin. -
Win8.1-TV Monitor resolution, need 1360x768 only allow 1280x720 & 1920x1080! Works fine in Win7!
I replace my win7 pc with a win8.1 pc. the TV monitor I was using with Win7 worked fine with 1360x768 resolution, however I don't have that choice with the Win8.1. I tried for months now with default & custom settings. I think is that Win8.1 sees the
display as Funai TV (Sylvania) where as Win7 as the Intel video display driver.
Some suggest edit the monitor.ini, not sure if that will work!
Any help is appreciated!Hi, ecscomp,
Based on my research, the resolution of second monitor should be managed by PC's graphic card driver, not Windows. That's to say, if the graphic card driver doesn't had a correspond setting to change display resolution settings, I'm afraid we have no way
to change the resolution to 1366x768.
Thanks for your understanding.
Roger Lu
TechNet Community Support -
Adjusting for monitor resolution
Hi all. Just a quick question...hopefully it is in the right
topic.
I think I remember reading here a long time ago, that you
could write a script that would have read the monitor resolution
and load the approperiate index.thml file for that screen and
viewing size. Was I just dreaming or is it possible to write a code
that can detect monitor size (like 800x600 or 1024x768) and load
index.html that is right for the particular monitor the user is
using. ?
Thanks for any infor/help on this.AlexisNeel wrote:
> Hi all. Just a quick question...hopefully it is in the
right topic.
>
> I think I remember reading here a long time ago, that
you could write a script
> that would have read the monitor resolution and load the
approperiate
> index.thml file for that screen and viewing size. Was I
just dreaming or is it
> possible to write a code that can detect monitor size
(like 800x600 or
> 1024x768) and load index.html that is right for the
particular monitor the user
> is using. ?
open flash help, select ActionScript section and type in
"screen resolution".
There are only 3 topics, all related to your question.
In the future, please try to check available documentation
before posting questions.
It's counter productive for us retype what you already have
in your manuals.
Best Regards
Urami
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
How to resize Labels size based on the column margin changes in JTable??
I have a constructed JTable with 4 columns. Accordingly, I added 4 JLabels for each column. JTable and JLabels are attached to a scrollpane. That in turn, attached to a JFrame.
What I need is, at the runtime, when I change the column margins of a column in JTable, accordingly, the size/margins of the Labels should change..
I am extending AbstractTableModel in order to populate the data in the table, as I should have a checkbox in the constructed JTable.
Please, help me out in finding a solution for this...Hi pritam,
The “maintain proportions of window for different monitor
resolutions” property will maintain the proportional size of the front panel
(its x and y sizes) when opened in a different resolution. The front panel
objects will not be resized and will appear larger (and may not fit inside the
front panel) when saved in a higher resolution, and moved to a lower
resolution. You can use the “Keep window proportions” property to achieve the
same results.
To have both the front panel dimensions and front panel
controls scale, you need to have both the above property and the “scale all
objects on front panel as the window resizes” selected. The labels will not be
resized by this.
I tried using both properties on two monitors and noticed
that the change does not occur when the resolutions between the monitors are
different. I had to lower both monitors’ resolution to see the change work
properly.
Please post back if you have any questions. Have a great day!
Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments -
Why is my user interface monitor resolution dependent?
The user interface I created with Labview is screen resolution dependent. That means I built a user interface application exe on my computer. But when I run the exe on another computer with lower resolution, the application window was enlarged and some of the controls were cut off. I have had the problem all the time and it bacame a famous issue in our engineering group . By the way, I didn't check any box in the VI Property\Window Size window. Can you help me to fix this problem?
I use Labview 7.1.1 and had this issue, the fix is under VI Options.. goto Window Size and check "Maintain proportions of window for different monitor resolutions", there is also a check box for "Scale all objects on panel as the window resizes".
Give these a try they should work for you.
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com -
Changing monitor resolution and refresh rate
Does anyone know how to change the monitor resolution and refresh rate on a Sun workstation?
Hi,
On Solaris 8 you can use the command fbconfig to do this job.
Please check the FAQ:
http://access1.sun.com/technotes/00921.html
and also man page of fbconfig.
Regards -
My Mac mini no longer detects my monitor resolution
My Mac Mini has stopped being able to detect the resolution of my monitor, which is a 1680x1050 Acer widescreen. 1680x1050 is also no longer a choice of resolutions under 'Displays' in 'System Preferences' so I cannot select my monitor resolution manually. I suspect that there is a bug somewhere in a recent update which has broken support for my monitor. Is there an official channel by which I can report this bug? Has it been reported already? Is there an ETA on a fix? This renders my Mac more or less unusable.
Here's some info about what I'm running:
Hardware Overview:
Model Name: Mac mini
Model Identifier: Macmini3,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.26 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 3 MB
Memory: 4 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MM31.0081.B06
SMC Version (system): 1.35f0
NVIDIA GeForce 9400:
Chipset Model: NVIDIA GeForce 9400
Type: GPU
Bus: PCI
VRAM (Total): 256 MB
Vendor: NVIDIA (0x10de)
Device ID: 0x0861
Revision ID: 0x00b1
ROM Revision: 3362
Displays:
VGA Display:
Resolution: 800 x 600 @ 60 Hz
Pixel Depth: 32-Bit Color (ARGB8888)
Main Display: Yes
Mirror: Off
Online: Yes
Rotation: Supported
Display Connector:
Status: No Display Connected (Ed: There is definitely a display connected. I'm using it to file this report.)
System Software Overview:
System Version: Mac OS X 10.6.8 (10K549)
Kernel Version: Darwin 10.8.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: siracusa
User Name: Christopher Rossi (chris)
Secure Virtual Memory: Not Enabled
64-bit Kernel and Extensions: No
Time since boot: 4:52It's unlikely that the upgrades had anything to do with the problem, slim superdrives are just not all that reliable.
You might try a few tricks before taking it in for service or springing for a Mac compatable external DVD drive.
1. Reset the SMC > Resetting the System Management Controller
2. Reset the PRAM > Resetting your Mac's PRAM and NVRAM
3. Clean it, for example with a > Memorex OptiDisc CD/DVD Laser Lens Cleaner -
Est. external monitor resolution
I am trying to set up a samsung syncmaster 191Tplus as an external monitor on my macbook from early 2008 running 10.6.8. When I plug it in, both screens flash (not just a flicker) as shown in this youtube video posted by someone else, but my problem is the same
http://www.youtube.com/watch?v=2-Yz-Em2GU4.
I am using the mini-DVI to VGA adaptor. The resolution of the samsung is 1280x1024, which is not listed in my choice of display resolutions. Is this the cause? What can I do? I can't access settings to change anything after the monitor is connected, and I can't find settings for the external monitor before it is connected. Would using SwitchResX work to create a monitor resolution preset before plugging in the second monitor?OK, here is something to try. Go into System Preferences and select Displays. In the window that opens will be a checkbox for "Show displays in menu bar." Put a checkmark there and make it active. There should now be a little icon of an Apple display on the right side of the menu bar at the top of the screen. If you click on it, it will drop down and give you a short cut to different resolutions. There should be a checkmark next to the currently active resolution. Is it set to 1440 x 900? If not, set it there.
If you are still getting that message from the monitor, well, I don't think the Mac is lying about sending 1440 x 900. If the screen doesn't look right to you, try using the Auto Adjustment feature on your Viewsonic monitor. It could just be that the image needs adjusting. -
Hello,
I bought my mac mini today ( 2.6GHz dual-core Intel Core i5 - Intel Iris Graphics - OS X Yosemite ) I connected using the DisplayPort DVI cable to my Viewsonic vx992 monitor. I have been using this monitor for my Windows XP which used to give me 1280x1024 resolution.
When I connect the new Mac to my screen is work but I with poor monitor resolution .. It's 1280x1024 but poor not clear
I'v been used this monitor with Windows with the same resolution and the monitor resolution was excellent with Windows.
I connected the Mac with Samsung Smart TV via HD cable .. The monitor resolution is excellent
This is the converter that I used:
http://www.amazon.com/gp/product/B007KB0EGC/ref=oh_aui_detailpage_o00_s00?ie=UTF 8&psc=1
Now, I'm conflict .. Is the problem with the convert that I'v been used or from the monitor ??Hi IIIaass
I don't know if the screenshot will showing you the noise that I talk about ,, there is a little noise in the text for example .. I work for while on my monitor and I know the resolution quality and the clarity that should be,, and I don't want to buy new monitor then I discovered that the problem was from the Adapter.
Thanks again .. and please tell me what's the best HDMI converter to DVI if you know about it. -
We are getting this alert on a fair few of our VMs with VHDXs and Dynamic VHDs. Everything seems OK but I am not sure what this actually means and what I need to do to resolve the issue. How do I reset the error count if that is what is required? Thanks
in advance.
Alert: Error Count Monitor Resolution state: New
Error Count Monitor Source: MyVm01 Path: MyHost.MyDomain.local;MyHost.MyDomain.local;FE71577B-A2E2-45C0-B757-2FBCEC9311DE Last modified by: System Last modified time: 2/9/2013 2:08:48 PM Alert description: Instance c:-clusterstorage-volume1-MyVm01-virtual
Sat 09/02
To:Administrator
09 February 2013 14:09
Alert: Error Count Monitor
Source: MyVm01
Path: MyHost.MyDomain.local;MyHost.MyDomain.local;FE71577B-A2E2-45C0-B757-2FBCEC9311DE
Last modified by: System
Last modified time: 2/9/2013 2:08:48 PM
Alert description: Instance c:-clusterstorage-volume1-MyVm01-virtual hard disks-MyVm01-DATA02.vhdx
Object Hyper-V Virtual Storage Device
Counter Error Count
Has a value 9
At time 2013-02-09T14:08:48.0000000+00:00
DarrenBut I am getting this alert from SCOM and SCOM has no information about the alert for me to find out what to do - thought that was the point of SCOM to let you know of problems and how to resolve them. :)
The alert is coming from the Error Count Monitor that is part of the Hyper-V Management Pack Extensions (v 4.0.0.0)
I have tried looking in the Event Logs on the Host and there doesn't seem to be any storage related errors there. I am trying to establish if this is a false positive, why it is happening and if it is safe to override and ignore.
There is nothing on the Product Knowledge tab and nothing on the Alert Context other than what I have already mentioned (see below).
Thanks for responding.
Time Sampled:
09/02/2013 14:08:48
Object Name:
Hyper-V Virtual Storage Device
Counter Name:
Error Count
Instance Name:
c:-clusterstorage-volume1-myvm-virtual
hard disks-MyVM-DATA02.vhdx
Value:
9
Darren -
Changing monitor resolution with proper aspect ratio
My project size is 800x600 and I wanted to provide an option to the user to change their monitor resolution at 800x600 by clicking on button. I have also planned to do it by using buddy api xtra, and already tested it. The problem is, when I am doing this on a PC with panoramic monitor (native resolution 1920x1080), it got stretched. I know it's very natural (as the aspect ratio has changed ) and I can get it in shape by squeeze the width using 'draw.rect'.
I noticed, there are some PCs with advanced display card that don't even get stretched, but shows the 800x600 resolution in proper aspect ratio by keeping the extra space black both sides. And I don't need to write any further codes (squeeze the width using 'draw.rect') to keep it in shape.
The real problem starts here, I can't able to filter the above situations by any logical means. I wanted to write codes only for the PCs that get stretched, but I didn't able to find any support from Director to determine which type of display card has been attached. I need to know whether it will get stretched, or the display card can able to manage the aspect ratio.
Any one have any solution in this matter?
Please don't hesitate to ask if you need any more info.Hello handler
If you talking about this kind of thing...
https://forums.adobe.com/message/5773207
search for..... _movie.stage.drawRect = _system.deskTopRectList[1] & _movie.stage.rect = _system.deskTopRectList[1]
You don't need an xtra to change the resolutions - but you do have to work a few things - I tend to use flash text because it scales better.
regards
milky -
Generating an html report based on table at sql 2005 db
Hi
I want to create an html report based on a table named inventory on sql server 2005 database.
first code used to generate an output report
try {
// TODO add your handling code here:
String s = "<html> <body> <table border=1><caption> Inventory Report </caption>";
s += "<tr><td>Item_id<td>item_name<td>Existing quantity</td><tr><td>3<td>4<td> <td>";
byte[] sb = s.getBytes();
FileOutputStream fs = null;
try {
fs = new FileOutputStream("D:\\Report\\Report.html");
} catch (FileNotFoundException ex) {
Logger.getLogger(mileshframe.class.getName()).log(Level.SEVERE, null, ex);
fs.write(sb);
fs.close();
} catch (IOException ex) {
Logger.getLogger(mileshframe.class.getName()).log(Level.SEVERE, null, ex);
Second jdbc code for connection and select all records in the table
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:MerchandiseCon","sa","sql123#");
st = con.createStatement( );
ResultSet rset=st.executeQuery("Select Item_code,Item_Name,item_cost,item_quantity from Inventory");
String s="";
while(rset.next())
s+=(rset.getString(1)+"\t\t"+rset.getString(2)+"\t"+rset.getString(3)+"\t"+rset.getString(4)+"\n");
st.close();
con.close();
catch(ClassNotFoundException ex)
ex.printStackTrace();
catch(SQLException ex)
ex.printStackTrace();
} I want someone helps me to merge two codes into one code to generate an output html report.
thanks in advanceThis is my trial but not the desired result ,it's displayed the title and a line only
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
String s = "<html> <body> <table border=1> <caption>Report title</caption>";
byte[] sb = s.getBytes();
FileOutputStream fs = null;
try {
// TODO add your handling code here:
try {
fs = new FileOutputStream("D:\\Report\\myeport.html");
} catch (FileNotFoundException ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
fs.write(sb);
fs.close();
} catch (IOException ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:MerchandiseCon","sa","sql123#");
st = con.createStatement( );
ResultSet rset=st.executeQuery("Select Item_code,Item_Name,item_cost,item_quantity from Inventory");
while(rset.next())
s+=("<tr><td>"+rset.getString("Item_Code")+"</td><td>"+rset.getString("Item_Name")+"</td><td>"+rset.getString("item_cost")+"</td><td>"+rset.getString("item_quantity")+"</td></tr>");
try {
// TODO add your handling code here:
try {
fs = new FileOutputStream("D:\\Report\\myeport.html");
} catch (FileNotFoundException ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
fs.write(sb);
fs.close();
} catch (IOException ex) {
Logger.getLogger(NewJFrame.class.getName()).log(Level.SEVERE, null, ex);
st.close();
con.close();
catch(ClassNotFoundException ex)
ex.printStackTrace();
catch(SQLException ex)
ex.printStackTrace();
} -
hi! hooked up my new macbook pro to my LGE2442 monitor using a MDP to HDTV cable and the monitor resolution is terrible. suggestions? thanks!
thanks, guys mirror on/off didn't make a difference and there were no resolution options with the cable. switched to a VGA adaptor and all is working great now! cheers
Maybe you are looking for
-
IWeb 08 ver 2.0.3 and a NOOB
Just switched to the mac. So any help would be much appreciated. So, iweb crashes every time I try to save the page or try to publish a page. It always acts as if it is going to save but the bar only gets 1/4 of the way across then the whole applicat
-
Auto-Populate a Textbox in BSP
I would like to write an ABAP program that references an existing BSP application. The ABAP program needs to read through a file - and pass fields from the file to the BSP screen fields. Then the ABAP program needs to execute the SAVE operation on t
-
Visual alerts no longer appear when I receive a chat
My iChat icon no longer has the little red bubble with the white numbers appear to alert me when someone has chatted me. The alert sounds work though. I haven't changed any system preferences, and I've restarted both iChat and my computer and I still
-
How to turn off this audit?
I see lots of auditing records getting generated with action# 85, i looked up, it is truncate table. how can i turn it off? the following are the current auditing option from this database. which one is generating this action# 85. ==== AUDIT ADMINIST
-
Adobe acrobat pdf compare problem
I have query on Adobe Acrobat Proffesional 7 on comparing texual difference for the attached two pdf file its show text is identical. But in the two pdf files difference is present. Please kindly advise on this. Thanks..