Scaling Problems

I have a action script 3 project in flex 2 and I am seeing
some sort of auto scaling that is causing me grief. This is a pure
actionscript project. In my main class i have a background added
and the background image size is the exact same size as the flash
window(700x500). This is specified in the html that launches the
swf.
The problem is that the image is being stretched such that a
large portion of it is off the bottom of the window. Using screen
capture, i was able to confirm that the visible area is 700x500. If
i add a component thats 50 in height, and screen cap it, it ends up
being more like 80 in height.
What i really want is a 1 for 1 pixel representation, or for
it to scale to fit whats in the html, such that there is never
anything cut off.
If anyone has any ideas how this might be happening I would
love to hear it.

stage.scaleMode=StageScaleMode.NO_SCALE; did the
trick.

Similar Messages

  • Image scaling problem with object handles

    Hi,
    I am facing scaling problem.I am using custom actionscript component called editImage.EditImage consists imageHolder a flexsprite which holds
    image.Edit Image component is uing object handles to resize the image.I am applying mask to the base image which is loaded into imageholder.
    My requirement is when I scale the editImage only the mask image should be scaled not the base image.To achieve this I am using Invert matix .With this
    the base image is not scaled but it  is zoomed to its original size.But the base image should not zoomed and it should fit to the imageholder size always. When I scale the editImage only the mask image should scale.How to solve this.Please help .
    With thanks,
    Srinivas

    Hi Viki,
    I am scaling the mask image which is attached to imageHolder.When i  scale
    the image both the images are scaled.
    If u have time to find the below link:
    http://fainducomponents.s3.amazonaws.com/EditImageExample03.html
    u work with this component by masking the editImage.If u find any solution
    for scale only mask ,plz share the same.
    thanks,
    Srinivas

  • Macbook to Hdtv scaling problems

    Hi there!
    I have a macbook 2008 alumiinium 2.4ghz model. I am trying to connect it to my HDTV. I bought a miniDP to HDMI and connected to my tv and it works great. The picture fits the tv perfectly, however even though it fits the screen I was wanting to use the bigger screen to work on Logic Pro as a 13in screen is a bit of a pain at times. The problem is that so far my macbook screen it being stretched to fit the 42in tv screen so I don't actually get any extra space as my screen just looks bigger!
    Any suggestions on setting to fix this? I have an LG television if that helps. I cant for the life of my figure how to get it to work. The picture on my tv is really sharp and great but its just scaling up everything on my mac when what I really want is to be able to use that extra screen real estate for my logic pro projects!!!
    Cheers in advance!
    Tom

    There is a chance that your MDP to HDMI adapter is not working properly with audio. I had that problem with one that I had bought. I tried a newer one and the sound came through with no problems.
    The only thing I would suggest (before buying a new adapter) is, try a different HDMI cable... if you have one. That way you can rule out that as being the problem.

  • AS2 stage Scaling Problem

    Hi..
    I'm Ajanthan.. I work for a e-learning concern. Now i had a problem. I have developed the entire module with 800x600 Resolution.
    But Now I got an issue that i need to reduce the content area (Shrink the contents instead of changing the resolution). Because some one had developed the custom player that will affect some of the margins of the content.
    Is there any AS2 script is avail for scaling the entire stage to 80 % of its original size for the entire module... If so Please help me in this...
    Thank you..
    Ajanthan M

    or take the as2 v-cam from the internet and put it in your flash on a new layer, and scale the vcam +20% of the stage size.

  • Scrollable frame scaling problems

    Hello all,
    Having a funny problem I've never encountered before. I've got the usual set-up for a scrollable frame ( content / content frame ) I've grouped it all together and then when I paste it into the content frame it either scales itself down and then when I tried it again it scaled itself up. The content in question is a combination of picture and text. Anyone encountered this before? Any solutions? The only solution I found was to copy an old scrollable box box from an old page.
    As always any help is much appreciated.

    Right click the frame and choose Fitting > Frame Fitting Options. Deselect Auto-Fit:

  • Charts data axis scaling problem

    Post Author: rameshp
    CA Forum: Charts and Graphs
    Hi ,
    I work on crystal reports XI.
    I'm facing problem regarding scaling data axis. I have illustrated that in the following lines:
    case1) if i have high values (sum of bytes) like more than 600 etc. its scaling data axis from 0 to say 1000.
    case 2) if i have low values like 0,1 (bytes)   then its scaling from -4 to say 6 .
    I don't want negative values on data axis .  I want from 0 to max. So what's the better way to do this using chart expert.
    Your suggestion is highly appreciated !
    Thanks,
    Ramesh.

    Post Author: jsanzone
    CA Forum: WebIntelligence Reporting
    satwar,
    There is no "trick", we're just victims of the limitation that WebI has in portraying XYZ type charts to our better liking.  I submitted a request to Business Objects Tech Support in Oct 2006 and became the proud holder of two ADAPTs:
    ADAPT00676587 u2013 for the scaling issueADAPT00676609 u2013 for the stacked bar chart, line graph issue
    When fully implemented, the scaling for Y and Z should be able to correspond to each other.  For instance, max value of Y and max value of Z will set on both scales the same max value.  I don't discourage you from submitting a trouble-ticket, perhaps if they get more noise on this situation they'll resolve my (our) ADPAT sooner, but just hoping....

  • 9-slice scaling problem on symbols

    Hi there.
    If I have a 9-slice scaling guide setup on a symbol, then
    drag it onto the canvas.
    I have an issue.
    When the image is dragged onto the canvas, the bounding box
    is too large, like it doesn't accurately represent the actual image
    data of the symbol.
    So say I had a rounded rectangle that was 100x20 (px), and I
    added 9-slice scaling guides on it.
    When I drag that symbol to the canvas, the symbols' bounding
    box is no longer 100x20, but more like 150x40(px).
    Anyone know why this may be happening?
    I do have layer effects on the symbol in question.

    bcharan wrote:
    > I think I figured out what the problem is, but not how
    to fix it. Here is the
    > png:
    http://www.flickr.com/photos/brijcharan/2243159150/
    So the issue seems
    > to happen when I use photoshop live effects. If I
    disable it, the bounding box
    > is fine. Check the above image and you'll see the
    difference. The left one has
    > the effect, the right one has it disabled. you'll see if
    you select the left
    > symbol, the bounding box looks much larger than the
    image itself.
    >
    Photoshop layer effects use the entire layer, rather than
    just the
    object. Try using native Fireworks effects, or create your
    slice
    manually in the symbol.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    Adobe Community Expert
    http://tinyurl.com/2a7dyp
    See my work on Flickr
    http://www.flickr.com/photos/jim_babbage/

  • Trying to sum up the QHD/scaling problems and solutions

    Hello all,
    For a while I've been thinking about buying the Yoga2 -pro, yet I was (and am) worried about the high resolution making everything too small to work with. 
    Since there are so many posts (some with conflicting stories) in this forum regarding this issue, I'm trying to sum up where things stand at the moment,  especially as for what solutions are there at the moment and how do they work. 
    My uses are very simple, I surf the web allot using chrome, I read many pdf files using PDF exchange viewer and zotero as a file manager, I also use office 2010/13, dropbox, and also two research related software called atas.ti and SPSS.
    From what I've been reading there are two solutions - 
    1. Using windows 8.1 new scaling option. This works for most programs but not for all.
    My questions are: how bad is it when a progrma does not scale right. Is it still possible to use it ?   
    If anyone uses one of the programs mentioned above and can tell me how do they handle the highdpi setting It  would be great. 
    2. I've seen some posts about people how set their screen resolution to a lower resolution, (usually regular HD) then the native one. 
    Is that works well as if the screen was a regular hd screen, or does it create different problems ? (if not that might be the solution for me, as I really don't care much for qhd)
    Thanks 

    gshani wrote:
    Hello all,
    For a while I've been thinking about buying the Yoga2 -pro, yet I was (and am) worried about the high resolution making everything too small to work with. 
    Since there are so many posts (some with conflicting stories) in this forum regarding this issue, I'm trying to sum up where things stand at the moment,  especially as for what solutions are there at the moment and how do they work. 
    My uses are very simple, I surf the web allot using chrome, I read many pdf files using PDF exchange viewer and zotero as a file manager, I also use office 2010/13, dropbox, and also two research related software called atas.ti and SPSS.
    From what I've been reading there are two solutions - 
    1. Using windows 8.1 new scaling option. This works for most programs but not for all.
    My questions are: how bad is it when a progrma does not scale right. Is it still possible to use it ?   
    If anyone uses one of the programs mentioned above and can tell me how do they handle the highdpi setting It  would be great. 
    2. I've seen some posts about people how set their screen resolution to a lower resolution, (usually regular HD) then the native one. 
    Is that works well as if the screen was a regular hd screen, or does it create different problems ? (if not that might be the solution for me, as I really don't care much for qhd)
    Thanks 
    I'm running 3200x1800 at 185% Windows scaling, and everything looks perfect.
    Really, the screen is so good and sharp that going down from this resolution to 1920x1080 feels almost like going down from 1920x1080 to 1366x768.
    There are only very few apps that don't scale properly and look tiny. Adobe's apps such as Photoshop, Viber, Dropbox, FastStone Viewer. Viber anyway has modern app, which works and behaves perfect.
    If you want to keep your laptop for more than a year then I'd say it's well worth to go for a higher resolution. This trend is just accelerating.
    But, even right now, practically all everyday desktop apps work perfectly at regular 3200x1800 resolution, with Windows scaling that you can choose, 200% being a default one.
    When resolution is changed to 1920x1080 the resolution doesn't look at all that bad as I expected. In fact, it looks pretty decent. Maybe not as sharp as native 1920x1080 display, but pretty close. I bet most people would hardly notice a difference...
    Normally, LCD displays look all blurry if set to anything else than their native resolution. But Yoga 2 Pro has pentile display, which doesn't have full 3 RGB subpixels for each pixel but more like 2 and half, and so it actually scales better and sharper when set to non-native resolution.
    Additionally, the very high native resolution makes everything look better at non-native resolution, such as 1920x1080.
    Bottom end - there's really no need, if at all, to run any other resolution than native 3200x1800. You just adjust Windows scaling to what you like and enjoy the super sharp screen.
    I've read about this issue before I bought my Y2P, and was concerned a bit, but now that I have it and use it I see there's no reason for any worry.

  • Image scaling problem

    Hello,
    I have been trying to scale an image to create a thumbnail. The thumbnail image size is around 200*200. The thumbnail is to be rendered on a web browser. My code is:
    public static byte[] getScaledImage(InputStream imageData) throws IOException {
           Image origImg = ImageIO.read(imageData);
           int origImgHeight = origImg.getHeight(null);
           int origImgWidth = origImg.getWidth(null);
           int newImgHeight /*determined by custom logic*/;
           int newImgWidth /*determined by custom logic*/;
          /* code for determining newImgHeight and newImgWidth  keeping the aspect ratio */
           origImg = origImg.getScaledInstance(newImgWidth, newImgHeight,
                                               Image.SCALE_AREA_AVERAGING);
           BufferedImage bimage = null;
           bimage = new BufferedImage(origImg.getWidth(null), origImg.getHeight(null),
                                      BufferedImage.TYPE_INT_RGB);
           Graphics g = bimage.createGraphics();
           g.drawImage(origImg, 0, 0, null);
           g.dispose();
           ByteArrayOutputStream os = new ByteArrayOutputStream(10);
           ImageIO.write(bimage, "jpg", os);
           return os.toByteArray();
    }The calling method is:
    FileCopyUtils.copy(ImageUtils.getScaledImage(lobHandler.getBlobAsBinaryStream(rs, 1)),
                                          imageContent);here imageContent is the http response's outputstream.
    Now the problem is the resulting image displayed on the web page becomes distorted. I first thought that this is due to the thumbnail size. But the scaling done by gimp does not distort the image.
    I have also tried this:
    BufferedImage thumbImage = new BufferedImage(newImgWidth, newImgHeight, BufferedImage.TYPE_INT_RGB);
           Graphics2D graphics2D = thumbImage.createGraphics();
           graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
           graphics2D.drawImage(origImg, 0, 0, newImgWidth, newImgHeight, null);instead of using getScaled instance.
    What could be the problem? This is a problem I need to solve immediately. So I am at a loss. Please help me here.

    Try scaling your source image like this:
    import java.awt.*;
    import java.awt.geom.AffineTransform;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class ScalingToSize {
        int W = 200;
        int H = 200;
        int SCALE_TO_FIT  = 0;
        int SCALE_TO_FILL = 1;
        private JPanel getContent(BufferedImage image) {
            JPanel panel = new JPanel(new GridBagLayout());
            GridBagConstraints gbc = new GridBagConstraints();
            gbc.insets = new Insets(5,5,5,5);
            gbc.weightx = 1.0;
            panel.add(wrap(image), gbc);
            panel.add(wrap(scale(image, SCALE_TO_FIT)), gbc);
            panel.add(wrap(scale(image, SCALE_TO_FILL)), gbc);
            return panel;
        private BufferedImage scale(BufferedImage src, int style) {
            int type = BufferedImage.TYPE_INT_RGB;
            BufferedImage dest = new BufferedImage(W, H, type);
            Graphics2D g2 = dest.createGraphics();
            if(style == SCALE_TO_FIT) {
                g2.setBackground(UIManager.getColor("Panel.background"));
                g2.clearRect(0,0,W,H);
            double scale = getScale(src, style);
            double x = (W - scale*src.getWidth())/2;
            double y = (H - scale*src.getHeight())/2;
            AffineTransform at = AffineTransform.getTranslateInstance(x, y);
            at.scale(scale, scale);
            g2.drawRenderedImage(src, at);
            g2.dispose();
            return dest;
        private double getScale(BufferedImage image, int style) {
            double xScale = (double)W/image.getWidth();
            double yScale = (double)H/image.getHeight();
            return (style == SCALE_TO_FIT) ? Math.min(xScale, yScale)
                                           : Math.max(xScale, yScale);
        private JLabel wrap(BufferedImage image) {
            ImageIcon icon = new ImageIcon(image);
            return new JLabel(icon, JLabel.CENTER);
        public static void main(String[] args) throws IOException {
            String path = "images/cougar.jpg";
            BufferedImage image = ImageIO.read(new File(path));
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new ScalingToSize().getContent(image));
            f.pack();
            f.setVisible(true);
    }

  • Edge Animate responsive scaling problem

    Hello
    I am having a terrible time with the responsive scaling from Edge Animate.
    When I insert the html into a div in Dreamweaver the scaling works, however any divs below the animation get pushed down (when scaling the page) causing a large and unsightly gap. I have rang Adobe about the problem and I tried a couple of things they said but nothing has worked. The operator was trying to tell me I have a problem with my css. However everything is logically in order. I changed the display from inline to block. When I change the position from static to absolute it simply ignores both the above and below divs, simply displaying over the top of them as though they don't exist. I have used margins and max height for the div with no positive outcome. Can anyone Please help! If I change the px size in the html(in Dreamweaver) to % it creates a scroll bar which is undesirable. I have noted I am not the only person having this problem. If there are some wiz coders out there, can you please try and recreate the scenario to see if it is in fact a problem with EA and DRW and not an era on my behalf because the issue is driving me nuts! Cheers.

    sorry no experts here

  • NSAffineTransform scaling problem

    Hi all,
    Can anyone please help me out with the following problem?
    Among other features, my first Cocoa app has a custom imageView within a scrollView. After loading an image, I'm looking to resizing it with a slider. The following relevant code snippets, hacked together from pieces of what demo code I could find (or -- as a newbie -- understand) load the image okay:
    /* interface */
    #import <Cocoa/Cocoa.h>
    #import "MyImageView.h"
    @interface AppController : NSObject
    IBOutlet NSWindow *theWindow;
    IBOutlet MyImageView *theImageView; // the (upper) graphics window.
    IBOutlet NSScrollView *theScrollView;
    IBOutlet NSSlider *zoomSlider;
    NSImage *theImage;
    - (IBAction)changeScale:(id)sender;
    - (void)scaleImageTo:(float)scale;
    - (void)scaleFrameBy:(float)scale;
    @end
    /* implementation */
    #import "AppController.h"
    @implementation AppController
    - (IBAction)openSourceImage:(id)sender
    NSString *filename = [self chooseFile:@"imageFile"];
    if([filename isEqualToString:@""]) // no choice made, so exit...
    return;
    theImage = [[NSImage alloc] initWithContentsOfFile:filename];
    if (theImage != nil)
    [theImageView setImage:theImage];
    [self scaleImageTo:1.0];
    // Resize imageView to fit image; causes the surrounding NSScrollView to adjust its scrollbars appropriately.
    [theImageView setFrame:
    NSMakeRect([theImageView frame].origin.x, [theImageView frame].origin.y, [theImage size].width, [theImage size].height)];
    [theImageView scrollRectToVisible:
    NSMakeRect([theImageView frame].origin.x, [theImageView frame].origin.y + [theImageView frame].size.height, 1, 1)];
    [theImage release];
    // Set "open hand" cursor as the documentCursor for our ScrollView.
    // We use the centre point of the cursor as its hotspot.
    NSCursor *handCursor = [[NSCursor alloc] initWithImage:[NSImage imageNamed:@"hand_open"] hotSpot:NSMakePoint(8, 8)];
    [(NSScrollView*)[theImageView superview] setDocumentCursor:handCursor];
    [handCursor release];
    // change image scale from slider input
    - (IBAction)changeScale:(id)sender
    [self scaleImageTo:([sender floatValue] / 100.0)];
    NSLog(@"image scale = %f",([sender floatValue] / 100.0));// what size have I got here...?
    - (void)scaleImageTo:(float)scale
    [self scaleFrameBy:scale]; // ...Houston, we have a problem...
    [zoomSlider setFloatValue:(scale * 100)];
    // transform and display the modified image
    - (void)scaleFrameBy:(float)scale
    NSSize imageSize = [theImage size];
    NSLog(@"image size = %d",imageSize);
    NSAffineTransform *at = [NSAffineTransform transform];
    [at scaleBy:scale];
    [theImageView setFrameSize:[at transformSize:imageSize]];
    [theImageView setNeedsDisplay:YES];
    @end
    However, zooming doesn't work properly of course, and even I can see why it won't...
    When the image is loaded it appears scaled to normal size by 'scaleImageTo:' and everything is good to this point. But when I try sizing it up with the slider, the image remains normal size and only the image frame gets bigger due to 'scaleFrameBy:'. This ultimately forces the image out of view at upper left of the scrollView. When I try to size the image down the image shrinks away to nothing at lower left of the window.
    I also notice that a slider value < 1.0 makes it shrink to the image's origin at bottom left, a value == 1.0 is the only 'happy' middle ground where everything is normal, and a value > 1.0 just grows the image's frame, leaving the image itself at its default (1:1) scale. Obviously, passing in a value > 1.0 with something along the lines of 'scale image x3' isn't going to work, and I now understand that it only wants to see a value between 0 and 1.
    I feel I've got the problem 90% solved but I'm obviously missing some way of scaling the image rather than its frame, or tying the image and frame together. I've looked for a logical companion to 'setFrameSize' (perhaps 'setImageSize'?) but without any luck. I'm sure I'm making a really dumb, basic obvious mistake here, but I've only been Cocoa programming five weeks now.
    What changes would I need to make/what critical code have I missed out to make this work please?
    Ernie

    Just to update this question, guys...
    I solved the zoom problem by (1) changing the image-loading code in my 'openSourceImage' method from:
    theImage = [[NSImage alloc] initWithContentsOfFile:filename];
    if (theImage != nil)
    [theImageView setImage:theImage];
    [self scaleImageTo:1.0];
    <snip>
    to now read:
    theImage = [[NSImage alloc] initWithContentsOfFile:filename];
    if (theImage != nil)
    [theImageView setImage:theImage];
    //**** next two lines seem vital for enlargement ***
    [theImage setScalesWhenResized:YES];
    [theImage setSize:NSMakeSize(2500.0,2500.0)]; // biggest desired size
    [self scaleImageTo:0.45]; // was previously set to 1.0
    <snip>
    I arbitrarily set 'setSize:MakeNSSize()' to display the loaded (page) image at the highest magnification I'd need, set the 'scaleImageTo:' value to a good default view setting -- and of course, set the slider range in IB between 0.22 and 1.0 (previously set to a max 100) now that I've learned that NSAffineTransform only wants to see a value between 0-1.
    What I HAVEN'T yet resolved is how to maintain a fixed 'view origin' (??) if you get what I mean. Since the image's origin appears to be the bottom left corner of the view, zooming in/out still causes the viewed text to shift horizontally and vertically. How can I fix this?
    Also, if I'm doing anything bad anywhere in my code, please feel free to correct me where necessary.

  • Preview scaling problem

    hello,,,
    I have a problem with preview when I try to scale Image; scaling not working -> image size remains without any change

    i'm having the same problem, when i change the scale, say to 100% like normal, average printing, the next time i print from preview, the scale is back up to something like 783%. it always fits it to the page, even though i have previously chosen to scale to 100%. is there a way to make it so i dont have to change the scale percentage and whatnot before printing? i've tried saving the settings but that only seems to work for the paper type, quality etc.

  • HDMI scaling problem, image is wider and taller than the display

    I can't seem to change the scaling on either the monitor or in my graphics properties. I'm using a HP Probook 4530s with a Radeon HD 6400m series in it. Neither the catalyst control center nor the hp custom scaling is available to me to fix this issue. Running at 1920x1080 which is the HP 2509m native resolution.

    My problem was resolved by going to intel's display options instead of ATI's on my laptop. Setting scaling to 50% there moved it the tiny bit necessary to get my title bar back.

  • Uniform scaling problem

    I've only recently purchased cs5 design standard for mac and just started having a problem trying to uniform scale objects in Illustrator. Basically holding down the shift key (with or without the option key) no longer scales uniformly. It's as if I'm not holding shift at all. I can't even create a square or circle anymore without using the Force or typing in the equal values in the scaling tool. indesign and photoshop are fine, so it's not the keyboard. I've tried trashing my preferences and even reinstalled Illustrator from the original disc and I'm still having the same problem. WTF?

    Rohan Caesar,
    Certain other applications may interfere. There is an updated list of known offenders in item 5 here: Other options
    You may try to close the relevant one(s) down and see whether it helps.

  • Layout scaling problem (Dreamweaver CS5)

    Hello,
    Thanks in advance for any and all responses.
    So I've done a couple tutorials, and am starting to get the hang of Dreamweaver. My problem is that all my divs are set up to scale in different browsers/resolutions using a percentage value, except for my header. For some reason, it is scaled in pixels, so whenever I use different browsers or zoom when testing my site, my heading gets stretched across the page and misaligned. I have already placed an image there as a source, and cannot find a way to prevent this misalignment. Should I just delete the div and reinsert everything?
    I'm using a MacBook Pro with OS X Snow Leopard 10.6.4, and CS5. I'm using the HTML template 3 Column Liquid with Header and Footer.
    Thanks,
    Ryan

    From your previous post I believe you're on a misguided mission to scale the header to different browser resolutions.
    Cross browser, you're going to have to put the actual image dimensions in the image tag for IE to behave:
    <img src="../Images/banner.jpg" alt="Parody Lyrics" name="header_img" width="1115px" height="90px" id="header_img" />

Maybe you are looking for