[solved] Make content fit the TitleWindow's size proportionally

Hi everyone,
I have a component which has the super class TitleWindow. It's basically used as a popUp for my application. So it receives a file name and adds it to the popUp using the MXML tag Image.
This content received is a SWF file, and I had no problems using the tag Image to import it (I'm new to Flex, but I guess there is nothing wrong with it).
My problem is that my application has a sort of "PowerPoint" style, and is going to be used in some presentations, so I want to make sure it works on all screen resolutions, from 800x600 till 1280x1024. And that's where the problem begins.
I could simply let Flex determinate the size of my popUp (depending on what is the size of the content, the SWF file), but I simply can't. That's because all of the SWF files are going to be 800x600, and so when you run this app in a 800x600 screen, things get messy. The popUp gets too big (in order to contain the content).
So the solution was to manually set the size this popUp, based on the user's screen resolution. I did this simply by using:
this.width = stageWidth * 0.9;
this.height = stageHeight * 0.8;
This works great and is exactly what I want.
However, the content is not being fitted into the popUp correctly anymore. It seems after setting manually the width and height of my popUp, all of those wonderful properties, such as horizontalAlign="center" and verticalAlign="middle",  were lost also. The content is too big when seeing the app in a 800x600 computer, while the popUp is on a correct size.
So I tried to resize the content also, based on the this.width and this.height. That solves some trouble, but then the problem is that X and Y positions are all messed, and so my content appears on wrong places, depending on the user's resolution.
Straight to the point: after customizing the width and height of my popUp (TitleWindow) how can I set the content to keep the aspect ratio (don't get distorted, since it's a 800x600 file) and also to be resized according to the dimensions that popUp has? I'm here for like 6 hours just trying and failing to do it, and it must be an easier way to do it in Flex.
Appreciate any advice.
Thanks!
Solved: I changed the Image tag for the SWFLoader tag. Also, added the property horizontalAlign="center". The rest was the same, and this solved my problem :D Weird.. I saw on some tutorials that Image could be used without problems to load SWF files... Well, works, and for sure it must be more correct also.

Solved: I changed the Image tag for the SWFLoader tag. Also, added the property horizontalAlign="center". The rest was the same, and this solved my problem Weird.. I saw on some tutorials that Image could be used without problems to load SWF files... Well, works, and for sure it must be more correct also.

Similar Messages

  • Booklet .pdf with crop marks, booklet doesn't fit the current paper size warning

    Hello. I am on XP using CS4 InDesign.
    I have the document set up as 4 pages, each 8.5 x 11, however, when creating a booklet .pdf, I mean it to be 2 pages 11x17.
    When I add in the crop marks they do not appear on the .pdf when it is created. I receive a warning in the booklet diaglog that the booklet doesn't fit the current paper size and it says to specify a larger paper size.
    What can I do to have the crop marks on my file? I understand the .pdf will be a little larger than 11x17 in order to fit the crop marks.
    Thanks for any help in advance.

    Hi Peter,
    Thank you. I did try that first, but now I figured out what I did wrong. When the .pdf was made and opened, I cropoped the page according to the marks, but the page remained 12 x 18 instead of 11x17. I made sure that the "automatically adjust to fit marks and bleeds" and "use document bleed settings" was checked in the booklet dialog and print InDesign dialog.
    When I cropped the page again to make sure I sized it correctly, it was 11x17.
    Thank you!!!

  • How can I make US letter the default print size in PSE12

    How can I make US letter the default print size in PSE12

    Clips from JVC Everio camcorders have always had this problem with Premiere Elements (all versions). You need to select Interpret Footage.
    See this FAQ from PE version 2, step 3. Like I said it has been this way with all versions:
    http://www.adobeforums.com/webx/.3bc1265c
    You might be able to use this tool to change the header of your MOD files so they are seen as 16:9: http://www.videohelp.com/tools/DVDPatcher
    Or use this program (SDCopy) to download the video's from the cam, it will allow you to copy straight from the cam to your PC and auto renames and corrects the aspect ratio.
    http://zyvid.com/smf/index.php?action=dlattach;topic=280.0;id=153

  • How do i make site fit in diffrent screen Sizes?

    How do i make my site fit in all screen sizes?
    Thanks
    -Bryan

    "BryanRob" <[email protected]> wrote in
    message
    news:emsf4m$nhc$[email protected]..
    > Heres what i did i made a site about that size in
    photoshop then saved it
    > and
    > put it in dreamweaver in a layer and moved the layer so
    it woul dbe
    > centered
    > then i added this code to get backround colar <BODY
    bgcolor="#3c0404"
    > text="#000000"> and then added another layer on top
    just for text. What am
    > i
    > doing wrong? SOme people say it looks good some dont.
    What are you doing wrong?
    1. Creating the site in Photoshop (web sites shouldn't be
    made entirely of
    graphics..)
    2. Using Dreamweaver layers
    3. Using deprecated code to style the the background color
    instead of CSS...
    As far as how it looks, obviously we can't say anything
    unless we see it..
    Patty Ayers | www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet
    Patty Ayers | www.WebDevBiz.com
    Free Articles on the Business of Web Development
    Web Design Contract, Estimate Request Form, Estimate
    Worksheet

  • How to make content fit on one disc.

    Sort of new to this. I have a 5.5 GB DVD project I want to fit on one single layer DVD. How do I make it fit without sacrificing too much quality?
    Is there an automatic way to change bit rate, etc to make it fit?
    Thanks

    PDTV is exactly right.
    You indicated you left the encoding to default settings of the program.
    That doesn't work very well, because the audio is uncompressed, and the settings in the preferences may not be consistent with the length of your video.
    For example, if you have 120 minutes of video and the default settings are maximum bit rate of 7.5, it won't fit, and your audio will be uncompressed aiff.
    Set a bit rate in Compressor suitable for the length of your video, and encode your audio to Dolby 2

  • How to Make Video Fit the Screen? (no boxing)

    Hi I have finished my video almost now. However when it is played back in WMV it is like in a letterbox in the middle of the screen. I want to upload it to YouTube so it will look quite small on the screen. Is there a way I can expand it to fit the screen better? There seems to be room both laterally and vertically to expand it. I just looked at the DVD box and it says 16:9 - is this widescreen? not sure. I would appreciate any help. Thank you.
    Rich

    hi i am editing a video and in the importing and the sorce box my video fits the screen but in the box that plays what i am editing it fits as a small box in the center with all this extra space around it and when i exported it onto a dvd it just came up as a little video in the middle of the screen. how do i get it to just fit the whole page?
    -Joe

  • How do I make sure the content fits the browser?

    I'm having a little trouble making content on a website fit in different browsers. It seems to be making extra space on the right side in safari and a LOT of extra space on the right side in firefox. How do I make sure the content will fit and be centered?
    Thanks in advance!

    That question is a little like asking "how do I build an airplane?"  It's just too vague and open ended for us to give you a meaningful answer. 
    Answers to layout questions are contained in your HTML and CSS code.  For quickest help, please post a link to your online page.
    Nancy O.

  • When I downloaded Firefox and opened it the page is only 1/4 of the size of the screen and in the center only. how do I make it fit the screen???

    Some web pages only show as a four inch strip down the middle of my screen. Some information gets cut off from the web page. Increasing the font size does nothing to help.

    You may have accidentally set the page zoom by using the keyboard shortcut to zoom out.

  • How to make pages fit to any screen size

    Is there a way to make the pages stretch or condense so that it fits any size screen? I've found where I can adjust the px size of the individual pages but I get white borders at the left/right and bottom edges of the screen that vary depending on the monitor size that I am viewing the page on. Is there a fix for this? Thanks.

    Welcome to the Apple Discussions. By screen size do you mean browser window size? If so you can get rid of the white around the body of the page by using a solid color or tiled image for the browser background which is set in the Inspector/Page/Layout pane.
    Or, if you want the page background to be the same as the browser background do the following;
    1 - set the browser background to what you have the page set to.
    2 - set the page content background to transparent.
    Now the page background will fill the browser's window no matter what size it is. That's how I have my tutorial site setup: http://toadstutorials.info.
    Click to view full size
    OT

  • How do I get a picture to fit the full frame size?

    I uploaded pictures into premiere pro and the picture is tall enough for the frame but not wide enough. I want to get rid of the black border without stretching the picture, How do i do so?

    If your images are an aspect that does not fit easily into
    a standard video frame, you might need to scale up
    (or preferably down) and reposition your images to fit.
    What are your image dimensions?
    What are your Sequence settings?
    What is the intended destination for your finished video?
    Premiere Pro / Motion: position, scale, and rotate a clip
    http://help.adobe.com/en_US/premierepro/cs/using/WSC7A162B6-6EF1-49e1-8622-8127366710BB.ht ml
    How do I choose the right sequence settings?
    http://www.video2brain.com/en/lessons/how-do-i-choose-the-right-sequence-settings
    Also, make sure you're running the most current update (CS6.0.5).
    Within Premiere:  Help > Updates...

  • Develop Module use of + and minus keys to make adjustments, can the default step size be altered?

    In the Develop Module you are able to click on the name of the slider and then use the + and - keys to adjust each element eg Exposure, Contrast etc etc. The adjustment steps are too large and I would like to be able to change the increments. Has anyone worked out if this is possible?

    Hi Ian,
    You are the last person I ever want to correct around here, but.... it's the . (period) / , (comma) keys for cycling through the Basic adjustments.  This is very handy; thanks for pointing it out.
    As for adjustment size, pressing Shift does make the increments larger, but pressing Alt (on PC) is for Resetting the Tone and Presence sliders.  Using the +/- keys work as expected, but the Up and Down arrows don't always move the sliders.
    John

  • A5 booklet  "doesn't fit the current [A4] paper size". What's wrong?

    Hi,
    Sorry, I'm new to InDesign, and am having a bit of a freakout over a booklet I need to complete by this afternoon.
    The page sizes are all A5. I try to print with A4 paper settings and the preview looks okay, but says underneath "the booklet doesn't fit the current paper size". Obviously A5, A4, it should fit perfectly, as  it looks to in the preview. When I actually print it the pages are slightly jumbled - 3 with 24  (of 24 pages), 4 with 23 etc., with the centrefold 12-13 split (12-15, 13-14).
    Any idea what's going on here? Is it something to do with crop areas? I can't work it out.
    Thank you! An enormous amount of gratitude to anyone who can help me fix this.

    OH HEY  it's suddenly saying it's fine now, even though the  only thing I've changed is to add a  bit  of  text, nothing that should fundamentally affect the structure. Thanks InDesign!

  • Fitting a photo or image to the photo box size

    I cant always set the photo to fit the photo box size in iPhoto when designing a book.
    How do you do this?
    Can someone help me please?

    That is the way you do it so if it is not working for you we need more information on what you want to accomplish, what you are doing,what happens and what does not happen
    Another way to skin the cat is to be sure your photos are in a 4:3 ratio by cropping them - that is the ratio of the frames - as long as you are placing a 4x 3 ratio photo it will fit the frame
    LN

  • When I open a powerpoint presentation with keynote the slides are very small. How do I make them fit a page?

    When I open a PP with Keynote the slides are very small. How do I make them fit the page, like they did in PP?

    I had the same problem.
    Go to preferences, slideshow, and check the box "Scale slides to fit display."
    Hope this helps!

  • Movie doesn't fit the tv screen

    Hi,
    i transfered a video from my camera wide screen to my laptop using iMovieHD6. Then, i shared it to iDVD6 and burnt a dvd using Best Quality encoding. When i play it on my tv, which is wide screen, the image is cut. Anyone can tell me what to do to make it fit the TV Safe Area. I am new to the mac world i need help!
    Thanks
    MacBook Pro Mac OS X (10.4.9)

    DVD: How to Determine TV Safe Area
    http://docs.info.apple.com/article.html?artnum=50151
    iDVD: Creating widescreen DVDs for standard size televisions
    http://docs.info.apple.com/article.html?artnum=303030
    http://discussions.apple.com/thread.jspa?messageID=2551853&#2551853
    Hope this is Helpful & Solves the problem but if not come on back.

Maybe you are looking for

  • MSS General info - exclude values in filter?

    Hi We have Employee Group as part of the columns in General data. It is possible to Filter, eg to set Reg* and get all "Regular employees". But is it possible to filter by excluding a value. Example: Given following emp.groups: Regular Employees Temp

  • My I-pad has no sound! checked everything! try resetting to no avail?  Help??

    My I-Pad 2 has no sound.  Have checked setting, tried holding the home and off button and restating, or just turning off and leaving awhile , still nothing.  Any ideas or help?

  • No image display

    The code is as under. and I created the jar file as jar cmf manifest.mft window.jar windowtrial2.class closable.class pkvv.gif The jar file is working but icon on the button is missing. The image file is in the jar file . But the program cannot read

  • Cisco ASA using Multiple DNS Names

    Hi, I am trying to setup a Cisco ASA for SSL vpn; however due to load balancing/traffic redirection performed by a different device; I was wondering if it may be possible perform a certificaate signing request/certificate required for it to have mult

  • What "Components" of After Effects require QuickTime?

    I get the message "quicktime is not installed on this system some components will not work correctly" whenever I startup After Effects.  It is true that I do not have QuickTime installed on this system, but I do have several questions.  (This isn't a