Resizing/moving MovieClips to fit screen problem

I'd like to make an Android and iOS app with Adobe AIR, but I found a problem I can't solve.
The Flash document size of the app is 800px x 600px, and I'd like to resize MovieClips to fit Android's and iOS' screens, suporting the Retina display on iOS devices.
I tried using StageDisplayState.FULL_SCREEN and StageScaleMode.SHOW_ALL, and this does seem to work with static MovieClips, so the snippet would look something like this:
import flash.system.Capabilities;
import flash.events.Event;
import flash.display.StageScaleMode;
import flash.display.StageDisplayState;
stage.addEventListener(Event.ENTER_FRAME,process);
var difN:Number = (((stage.stageHeight*stage.fullScreenWidth/stage.fullScreenHeight)-stage.stageWidth)/2);
function process(e:Event):void {
          difN = (((stage.stageHeight*stage.fullScreenWidth/stage.fullScreenHeight)-stage.stageWidth)/2);
          stage.scaleMode = StageScaleMode.SHOW_ALL;
stage.addEventListener(KeyboardEvent.KEY_UP,useFullScreen);
function useFullScreen(e:KeyboardEvent):void {
          if (e.ctrlKey) {
                    switch (e.keyCode) {
                              case Keyboard.M:
                                        stage.displayState = StageDisplayState.FULL_SCREEN;
                              break;
obj.x -= difN
However, I'd like to use classic tweens in my application, and this won't work since most of the elements are moving.
I'd like to rescale/move MovieClips so they don't look distorted and every moving item moves correctly, showing all the content and trying to not make any borders. I read this article but it seems like it doesn't support classic tweens: http://www.adobe.com/devnet/air/articles/multiple-screen-sizes.html.
Thanks for the help.

1. scaleMode only has an effect when you embed your swf in an html AND you publish for a percentage.
2. you need to resize your displayobjects using code and/or in the ide.  if you open your document settings panel (modify>document) and change your stage size you are offered some scaling options.  see if any work for you.

Similar Messages

  • Fit Screen problem

    I am using PS Elements 7 for some time
    When I load an image into the work space and press fit screen I used to always get a pretty full screen view but recently when I press fit screen the image is much smaller.  The info box shows 12.85% and in the past I think  it was about 20%.    How can I get back to the larger image.

    Quit the editor, then restart it while holding down ctrl+alt+shift. Keep the keys down till you see a window asking if you want to delete the settings file. You do.

  • MOVED: MSI Wind U135 screen problem

    This topic has been moved to MSI Notebooks & Netbooks.
    https://forum-en.msi.com/index.php?topic=160640.0

    Follow up: It turns out the cables for the keyboard and mouse came out. I put them back and it works fine now. The piece that fell out was not related to the problem. I think it was part of the back cover that came off.

  • Resizing a table to fit smaller screens

    Hey everyone; so I am building a site for my photography and
    I want the images to be quite large, but I want people with small
    monitors to be able to see the site automatically resized so that
    the browser doesn't crop the site any.
    Is there a way to make the tables to automatically resize the
    contents to fit the given browser window (the way a .gif or .jpg
    would if viewed on its own)?
    thanks,
    Danny

    > Contrary to popular belief, most browsers will allow an
    image to be shown
    > larger than its original size without noticeable loss in
    quality, as they
    > do
    > render images
    This would depend entirely on the type of image. Even a
    little upsizing can
    destroy a photo.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "azzza" <[email protected]> wrote in message
    news:[email protected]...
    > Danny,
    > I am currently setting up a site where the images have
    to adjust
    > proportionally for various monitor sizes. To accommodate
    this requirement,
    > I
    > wrote a short Javascript function which measures the
    availableScreenHeight
    > and
    > availableScreenWidth, and presents the image in its
    original proportions
    > AND
    > fits it into the monitor.
    > The URL of the site is www.rickball.com.au.
    > Find your way to the thumbnails and click to see an
    enlargement of the
    > image.
    > Look at the source code and you will find the Javascript
    function called
    > 'resise'. I have used PHP to draw the image dimensions
    from a database.
    > But if
    > you are using a separate HTML page for each image, you
    can insert the
    > original
    > image sizes for each image on each HTML page into the
    Javascript
    > function-call
    > in your opening body tag [explained later].
    > To test the appearance, you can set your own monitor to
    different
    > resolutions
    > and you will see that the images will fit as the
    availableScreenHeight and
    > availableScreenWidth measure the monitor size in pixels:
    Lower res = fewer
    > pixels, which are used in the formula. This formula
    needs a few minor
    > adjustments, but does work well.
    >
    > Contrary to popular belief, most browsers will allow an
    image to be shown
    > larger than its original size without noticeable loss in
    quality, as they
    > do
    > render images: but only to a certain point. Most of the
    images have a
    > benchmark
    > height of 675 or 700 px.
    > Let me know if you need any further help with this.
    >
    > If you copy and paste this function, don't forget to
    include your opening
    > and
    > closing tags for the Javascript:
    > <script type="text/javascript">
    > <!--
    >
    > //-->
    > </script>
    >
    > If you copy the JS function from the source code of my
    site, the function
    > is
    > 20 lines in height from the 'function resise(x,y){'
    line. Do not copy any
    > more
    > than that. The final line is a '}' (single closing
    bracket).
    > For your opening body tag paste this:
    > <body onload="resise([put image width here],[put
    image width here]);">
    > OR
    > <body onload="MM_preloadImages('[image name here]');
    resise([put image
    > width
    > here],[put image width here]);"> if you are using the
    preload behaviour.
    >
    > SAMPLE: <body
    onload="MM_preloadImages('Mud_man_map_lge.jpg');
    > resise(839,675);">
    >
    > To vary the amount of space around your image, change
    the .8 in the JS
    > formula
    > to more or less.
    >
    > Any further help, contact me here.
    >
    > Azzza
    >

  • Web page does not fit screen. now have scroll bar at the bottom

    2 problems exist and i have tried to find solutions to both with no luck. On Firefox 16.0.2 using XP Pro.
    First: Web pages no longer fit screen. Now have scroll bar at the bottom. For some strange reason this just started. I tried the CTRL+ 0 with no luck.
    Second: At the same time the above started when i open a program it opens in a reduced screen size and i have increase it to full screen size. This also occurs when i have it reduced 9in the system tray and i bring it back to the desk top.
    I have made no changes to firefox these problems just started. A reboot of the computer did not help

    Did you check the window settings of the Firefox desktop shortcut to see how Firefox opens?
    Did you try to delete the current Firefox desktop shortcut and create a new shortcut?
    Use Restore or Maximize in the right-click context menu of the Taskbar icon to set focus to the Firefox application if you do not see the Firefox window.
    Open the system menu of that Firefox window via Alt+Space and see if you can move and resize that window (use the keyboard cursor keys).<br />
    If that works then first close all other open Firefox windows and then close Firefox via "File > Exit/Quit" to save that setting.

  • How to How to install ATI Radeon HD2600 driver on bootcamp 3.0 windows 7 partition w/black screen problem

    Ok....so i've posted this question in a different way, and i gotten several "scratch the surface" answers from people just saying to install "Ati catalyst", or insert the os x dvd and run set up.exe, and update  to boot camp 3.1 or 3.2...while these all seem like great suggestions, I am finding myself needing more specific direction or "hand holding" so to speak.....here is the MAIN problem...
    The Background/history
    I used boot camp (3.0, and i found updates for 3.1 for imac and for windows, but can't find for mac pro, AND they all are ".exe" files which run on windows..which as you'll see is the big part of my problem...So I recently updated my mac pro (with the ATI Radeon HD2600 graphic PCIe card with 10.6.7 from 10.5.8.  I created a single partitioned drive to install windows 7 professional 64 bit.  The download software function didn't work (Thanks, APPLE for that poor level of support) so have to select the option that i have already downloaded, or have other media with the drivers already on it....i restarted with the windows 7 disk in.... 
    The installation of Windows 7 Pro 64-bit
    So the installation of windows 7 seemed to go flawlessly, was able to use my existing 23" hd apple cinema display (so somehow it has drivers that work with the graphics card, or maybe the motherboard's on board video components) and i select english, and install now, custom, blah, blah, blah...installation causes a few reboots, then restarts ultimately back in os x since that is the default boot os i use on this desk top and have to do the "opt" button to select booting in windows....so when i try restarting in windows, now using the actual boot drive on which i am installing it, it ran through another reboot or two, but then after that, my display goes black....  in the communities, the solution sounds super simple... "go download the ATI catalyst for the black screen problem....windows 7 doesn't have device drivers that work with the ATI radeon hd2600...no problem, just go download and install...."
    The problem, re-emphasized :  I cannot even finish the install for windows, because of this driver problem....i cannot see anything....I have tried to reboot in safe mode, and that then seems to invoke whatever basic drivers that do work, likely through the motherboards onboard video vs the actual graphic card, and the screen works and says that it's wanting to complete the installation, so i'm thinking awesome this is gonna work....and then.. "windows installation was not completed and cannot be completed in SAFE MODE, need to restart, blah, blah, blah" pops up...and forces reboot...so Safe Mode allows me to see, but won't allow me to finish the install of windows 7...and without completing the install i can't run (ranther I DONT KNOW HOW TO) any of the various .exe files everyone is telling me are the solutions to my problem...like update 3.1 and 3.2 bootcamp...they're all .exe files?  not sure why, because bootcamp runs in 10.6.7 i thought, but whatever...it needs running Windows to execute...then the ATI radeon hd2600 driver for windows 7 that i downloaded from the site has an installation program that is an .exe file, which needs windows to run...  Does this make sense, why i can't just use these fixes, that seem to be the only fixes out there....so can someone school me step by step here (not just the highlights) of how to update bootcamp, and how to install the ati radeon driver  without having been able to complete the windows 7 installation because the monitor goes and stays black????
    This is so very frustrating for the record...and any substantial help "not just go download this..." would be immensely appreciated.
    Some other things i've been told to try that i've tried and nothing seems to happen as i'm told it will....
    ---I've been told to install the osx dvd and run "setup.exe"  - AGAIN...it's an exe file...and 2 - when i put in the os x file it just wants to re install 10.6...so need more help if this is even a real solution to understand how to make it work...
    ---I've been told to update boot camp to 3.1 and/or 3.2 from 3.0, using Apple Software Update....Well, my software update is saying everything is up to date and there is nothing new to download at all, and when i reverify the bootcamp version it is still only 3.0.2...and again downloading the updates from www.apple.com/support/  for 3.1 and 3.2...all of those are .exe files...need windows to run them...again, refer to the problem described in detail above...
    ---I've been referred to the black screen on imac early 2011 thread saying it should fix my problem...and reading it it SEEMED like the most promising resolution...it involves creating a boot flash drive for windows 7 and an xml file that sets the imac drivers to auto install during the windows installation..and it got me farther than anything else..but still ultimately ended up in the darned black screen...my assumption is that it's because it's for imac and not mac pro so not ati-radeon specific drivers....ok....that's enough..please...anyone who thinks they can help...your help is desperately needed...thanks so much in advance!

    hey Hatter, thanks so much for getting back...so just to be super clear...is there no way to install the drivers using an exe file given my current state? no way to do it with command prompt or something?  if can make work with existing card, i'd prefer it...now when you say it's 'toast' how do you mean?  it works well with the os x partitions and always has...so i'm not sure i follow, just want to be clear...
    Now to your point of starting with only the one drive installed...so i would put that bootcamp drive in bay 1 and disconnect the rest...i'm not totally sure what you're suggesting the effect should be of doing this?  just that i'm just installing windows without the bootcamp deal...but if windows 7 doesn't support the ati radeon hd2600, it still will go black screen no? or you're saying it will run video through the motherboard if it's the only bootdrive, and will run all the way through the windows install without trying to switch over to the hd2600?  (slrry flr these questions..just really want to make sure i understand what you're telling me..thanks so much for your patience and help by the way...it's very greatly appreciated...your support is priceless!
    So now, assuming none of the above is possible...referring now to the ati 5770 that you referred to...you mention it works with 10.6 well, and that windows 7 supports it ...2 questions on that
         1) Windows 7 supports" meaning, out of the box windows 7 supports it? or will i have to install drivers still through some update, because again, if that's how i have to do it, then won't work, cuz can't start windows to see anything to install any drivers or run any thing at all...so it would have to just work with initial installation.
         2)hardware wise for my Mac Pro 3,1...intel dual quad core xeon, blah blah....will this card work? it's a PCIe and should fit on my board no prob, etc?

  • XML tag markers moved: Find and Replace causing problem in xml elements

    Hi All,
    I am doing find and replace using GREP. While using the expression like $1, $2 (Found Items) in the change to field it changes the placement of tag marker. If the found item is a part of two of more xml elements, I am getting a serious problem while replacing it. (ie. The xml tag markers are moved.)
    See the screen shot below, then you may get better idea. And help me to overcome this issue.
    This is just an example to show you what i'm trying to say, there are so many cases like this.
    Original text/ Before doing find replace
    After replacing
    Green4ever

    Hi Peter and John,
    but it seems to me that the example is looking for any space that
    follows a semi-colon and has two word characters following it, and
    repalce that with an em space. I think you could do the same using look
    behind and look ahead and not need to replace the found text.
    Yes you are right about the look behind and look ahead. I'd like to show some more examples to show what the actual problem is,
    Original/Before Replacing,
    (Consider there is another case here, instead of em-space some times normal word space will also be there)
    Using the Grep:
    Find What---------> ^(\d+\.(?:\d+)?)~m
    Change To------------->$1\t
    After Replace:
    Did I make any sense? Eventhough this will not make any changes in the layout, my requirement is to insert the tab out-side the tag marker not indise.
    Green4ever

  • Dynamically size movieclip to fit text's string height and width

    Hello,
    I am trying to dynamically size a movieclip to fit the size of a text's string height and width (This text is inside the movieclip)
    here is my code so far..
    var Font1_ = new Font1();
    var Format2:TextFormat = new TextFormat();
    Format2.size = 36;
    Format2.align = TextFormatAlign.CENTER;
    Format2.font = Font1_.fontName;
    var MessageBox:MovieClip = new MessageBoxMC();
    MessageBox.Text1.defaultTextFormat = Format2;
    MessageBox.Text1.embedFonts = true;
    MessageBox.Text1.antiAliasType = AntiAliasType.ADVANCED;
    MessageBox.Text1.wordWrap = true;
    MessageBox.Text1.width = 800;
    MessageBox.Text1.height = 400;
    MessageBox.Text1.textColor = 0xFFFFFF;
    MessageBox.Text1.cacheAsBitmap = true;
    MessageBox.Text1.mouseEnabled = false;
    MessageBox.Text1.text = String("Use the Arrow Buttons to move");
    MessageBox.width = MessageBox.Text1.width;
    MessageBox.height = MessageBox.Text1.height;
      MessageBox.x = 400;
      MessageBox.y = 200;
      addChild(MessageBox);
    this isn't working for me.. anyone know the best way to do this?
    I also want the text to be centered in the movieclip, with a border of around 2-4 pixels
    I am also not sure if i should be using text.length? any advice and input is greatly welcomed.
    thanks in advance!

    Essentially, you need to check for a change in .textWidth or .textHeight, which are different from .width and .height.
    This code works for me (assumes a background box called bg and a foreground text instance fg inside a moveclip and an X and Y bounds offset variable to say how far away you want the box from the text and a textFrameNudge to provide a tweak value).
         // Resize background box
         thisBox.bg.x = thisBox.fg.x - boundsOffsetX + textFrameNudge; // I'm using .4 as the tweak value for textFrameNudge
         thisBox.bg.y = thisBox.fg.y - boundsOffsetY;
         thisBox.bg.width = thisBox.fg.textWidth + boundsOffsetX*2 +textFrameNudge*thisBox.fg.getTextFormat().size;
         thisBox.bg.height = thisBox.fg.textHeight + boundsOffsetY*2;

  • Dynamically resize JTable cell to fit a JList

    Hi!
    I've been banging my head trying to add some dynamic behavior to a TableCellEditor. In short I'm trying trying to make it resize the height of the current row (the one it is in) to reflect the changes made to the JList used to let the user edit the cells value (which is a list of items).
    I've come across some threads dealing with the problem of resizing a cell to fit its content. This however is usually only done once (in the 'getTableCellEditorComponent' function) and so only provides half the answer. Also, since the editor is only active during cell editing I've been trying to make it revert to the old cell height after the editing is done.
    So far I have not come up with any decent solution to this problem and was hoping someone out there might have an idea or have read something similar and can point me to something helpful... anyone?
    Cheers!
    Teo

    The Swing tutorial on[url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]How to Use Tables shows how to dynamically change the size to Table Columns.
    If you need help calculating the acutal size then try searching the forum. Using keywords "resize jtable column" (keywords I took directly from your topic title) I found some promising postings.

  • The folders in the slide media menu moved to the main screen...

    i had a full powed off in my curve 9300, after that all the files (music pictures etc etc) in the media shortcut moved to the main screen.. how can i move them back???

    problem solved

  • Neither Automatically Resize nor Zoom to Fit working

    Hello out there in Appleland,
    Neither Automatically Resize nor Zoom to Fit is working in Preview 5.0.3 under Snow Leopard.  Zoom to Fit acts just like Actual Size or <Command> 0 and Automatically resize doesn't work at all.  This must be and bug, so please explain how this can be permanently fixed, even at the command line level.
    Thank you.
    Best regards,
    Bob
    Denver, CO

    I've found out a little more about Preview and its bug through a process of elimination.
    After examining Automatically Resize for Preview 3.0.9 on my old PowerBook G4 with OS 10.4.11, Preview 4.1 on my iMac with OS 10.5.8, and now Preview 5.0.3 on my MacBook Pro with OS 10.6.8, I discovered they all work the same way.  When Automatically Resize is checked the image is only resized when the window is reduced but never when the window is enlarged to a size greater than the image's Actual Size, which is a worthless feature for smaller images.  I don't think this is the way it is supposed to work, but I may be wrong.
    Where 5.0.3 differs from the other versions of Preview is in Zoom to Fit.  Under the View Menu, Zoom to Fit is grayed out unless the image stretches beyond the borders of the window (i.e. Automatically Resize toggled off).  In this case, the image will be reduced to the size of the window when Zoom to Fit is selected.  On the other hand, if the image is smaller than the size of the window, Zoom to Fit is not grayed out but neither does it enlarge the image to the size of the window when selected.  In other words, Zoom to Fit in 5.0.3 is only good for reducing an image to fill a smaller window but never for enlarging an image to fill a bigger window if that window is larger than the Actual Size of the image.
    Perhaps the problem is with Preview 5.0.3 failing to access com.apple.Preview.ImageSizingPresets.plist since removing all the Preview plists and launching the application anew does not recreate this particular plist.  Also, the modified date on the original com.apple.Preview.ImageSizingPresets.plist never seems to change.
    This is a damned annoying bug and should have been fixed when Snow Leopard was the standard.  In my opinion, the fact that this wasn't caught reveals Apple's slipping standards and a concentration on their growing market in mobile devices.  I feel I have a right to say this since I've been a loyal Mac user since the early 1980s.
    For those who suggest I move to Lion or beyond, you can keep the economy going with your new software purchases.  For now, I'm going to continue using Rosetta and my old, third-party applications in Snow Leopard.

  • Picture dosen't fit screen

    picture dosen't fit screen

    I have same problem too.i am not getting full screen mode on my tv when Apple TV connected.I tried to adjust the screen but it only display in the center of tv.

  • Lenovo Y50-70 screen problem

    Hello. Recently, i have bought the Lenovo Y50-70 laptop and it seems that there is some screen problem. I have a feeling that it does flicker sometimes (1-2 per hour, sometimes more). Firstly, I thought that the backlight changes for a second, but then, after more observation, it might be it turning off and on immediately, or the colours fade and return to normal. I can't say for sure, what it is, because it happens very quickly, but the eye catches it anyway and it is kind of annyoing. Moreover, once the screen went completely crazy, it started to turn off and on every 2-3 seconds, big portions of view weren't even displayed, and what wasn't displayed changed every time it turned off and on. There were also green and red dots moving all over, mouse was moving in slowmotion (like I were playing a game in 15 fps). Only the restart helped and it stopped. So the question is, what is wrong and what am I supposed to do? Sorry, if the english is bad, but it isn't my native language.

    I live in South Africa. Bought the notebook on 14 July 2015, within 2 weeks I started experiencing the screen flickering and grey lines. I was told by Lenovo to roll back drivers, then update drivers etc. - nothing worked. I returned the laptop to the supplier who in turn sent it to Lenovo. Lenovo has offered to replace the unit. I am hesitant to accept another unit and am thinking of rather getting a refund so that I can buy an Acer Aspire V Nitro (same specs). My previous laptop was an Acer and did not give me a day's trouble. Don't bother trying to update drivers or open the screen to plug it into the motherboard etc. I think the issue is a power supply one and that Lenovo should do a recall of this product. I am just thankful that South Africa has consumer law which forces a supplier to replace, repair or refund a defective product within 6 months from purchase if the consumer wants - so they can't simply repair, if I want a refund, they must give me one. Good luck! PS: This was my first and last Lenovo product!

  • Hi every1 , Screen problem Iphone 5

    Hi everyone,i have an iphone 5 here and 3 months ,lately i noticed that when i press a bit more hard the screen i see a effect like an LCD screen but with 2 lines that are moving all around the screen by the left and right part of it,i would like to know if this is a normal reaction of the screen or its a problem,whoever has an ip5 could try it for me ,this way can tell me if his ip5 does this
    Thank you all

    http://www.youtube.com/watch?v=_4kYbiygU6A type of this

  • Loader content got vanish on resize root movieclip

    Hello,
    I have made 30 dynamic movieclip and I put all these Movieclips in MainMovieclip, each movieclip loads one jpg image dynamically, when i resize root movieclip then
    all graphics got invisible. How can i resize parent movieclip, I can't resize individual loader content because there is complex thing will happen where i need to calculate x y position and height widh for individual,so that i put all movieclip in root moviclip and I resizing root movieclip.

    You likely already solved this issue...
    As I understand it, X, Y, width, and height are only read from the first frame of a loader object. Check to make sure that the content on the first frame of your object that your loading is the same size as the content of the entire object. In other words, if you have content on frame 50 that's 200 px wide in total from the registration point of x=0 y=0, and your content on frame 1 is only 100px wide, you'll need to add a transparent object on frame one (starting at x=0 y=0) that is also 200 px wide. If I understood your issue correctly, this should solve the problem. You can easily do a trace on the size of the object your loading to be sure that it's sizing correctly.

Maybe you are looking for

  • Mail rejecting outbound mail, gives error message

    Apple mail is all of a sudden rejecting outbound mail. It leaves this Error message: "This message could not be delivered and will remain in your Outbox until it can be delivered." "The sender address [email protected] was rejected by the server." At

  • Scheduling In JAVA !!!

    hello, i want some scheduling in my program ex. daily, weekly, monthly Which are the Scheduling Techniques ... 1) i know about TimerTask using threads 2) another is quartz package ( too hard ) which is another easy technique to handle scheduling plea

  • Adobe Reader XI Crashes

    I'm having problems getting adobe reader to work, I tried upgrading to version XI but still no joy, trying to run the program from the desktop shortcut or trying to open a PDF file gives the following error: Adobe Reader has encountered a problem and

  • How do I get rid of expired rental movies that won't go away

    I have three rental movies, one from September, that have viewed and/or the rental period expired. The movies say expired on the iTouch and won't play. They won't go away and their are consuming disk space. The don't show up in iTunes. How can I get

  • Cannot get NAT & Firewall configured correctly.

    Hi, I have spent days reading and trying to get this to work with no luck. I am trying to open port 3389 for RDP to an internal PC. I am also trying to get a H.323 IP phone to communicate to the PBX. I have tried allowing all communications from my h