Why does the stage layout change when native menu added

I have a program that was fine till I added a native menu to it. After adding the menu I have a space on both the left and the right of the stage. If I draw a shape at x=0, y=0 it appears about 40 pixels to the right of the window border. If I remove the menu the space still occurs what is going on?

Adding the menu shrinks the effective size of the stage. This happens because in the app descriptor, you set the outer size of the window, not the stage size. When you add a menu, the space for the menu is created by removing space from the stage, not by increasing the height of the window.
You see the bars around the app because you have the stage scalemode set to something other than noScale.(noScale is NOT the default.) The other scale modes attempt to keep most or all of the app in view when the app is not the same size as the stage (which happens when you add a menu to a window). The space around the edge is the result of the runtime scaling your content into the available space When you remove the menu, this space should be returned to the stage -- and does in my tests, so I can't explain why you don't see the scaling go away. Perhaps you are drawing your content based on the reduced stage size so you still have extra space after the menu is removed.
The stage align property determines how the content is positioned on the stage when it is scaled down. The default is center which distributes space to either side when the stage is scaled horizontally, which is why the origin effectively moves away from the left side of the window. If you used the an AlignMode of top left, the origin would stay in the top left corner.
In general, I recommend setting the stage scaleMode to noScale in an application, unless you have a specific need for one of the other scale modes. Even then, you can still scale things programmtically using logic appropriate to the situation. The other modes were designed for use in a browser where the SWF author may not have control of the stage and so must choose the least-bad compromise. In an AIR app, you have control and so don't need to make that compromise.

Similar Messages

  • Why does the file size change when put into an iDVD project? And problems with dual layer discs...

    I exported a short video of mine from Final Cut Express and the size of the file came out to 7.3 GB. When I put it into an iDVD project, it says that the file is only 800 MB. I tried just burning it onto a dual layer disc anyway to see if it might still burn at the original file size, but the disc came out unusable for some reason, and obviously hadn't been burned anywhere near full-capacity. So, I tried it again, and the exact same thing happened.
    I guess my first question is: why is iDVD changing the size of the file? I want the quality to be the best it can be, so keeping it at 7.3 GB as opposed to 800 MB is rather important.
    Secondly, why did the dual layer discs come out unusable? I've burned single layer discs before and they haven't been an issue. Also, I know for a fact that the drive can burn dual layer discs, so that isn't the issue.
    Thanks in advance to anyone who can provide me with help on this issue.

    LivelyJamesS wrote:
    I exported a short video of mine from Final Cut Express and the size of the file came out to 7.3 GB. When I put it into an iDVD project, it says that the file is only 800 MB.
    Guessing here but it looks like you edited/exported an SD/DV sequence of about 30 min in FCE. DVD needs to be MPEG-2 so iDVD compresses the original file down to the size that you report.
    LivelyJamesS wrote:
    I guess my first question is: why is iDVD changing the size of the file? I want the quality to be the best it can be, so keeping it at 7.3 GB as opposed to 800 MB is rather important.
    The quality will be what the MPEG-2 compression and the software allow for. MPEG-2 is DVD standard .... there's no way around that.
    LivelyJamesS wrote:
    Secondly, why did the dual layer discs come out unusable? I've burned single layer discs before and they haven't been an issue. Also, I know for a fact that the drive can burn dual layer discs, so that isn't the issue.
    Guessing again but it would seem that you burned a Data DVD instead of a Video DVD which would be unusable by a set-top player. As I said above you can't get around DVD standards.
    If by any chance your video was HD originally you can try to go the Blu-Ray route using Roxio Toast or FCS 3 (discontinued) or FCP X. You will also need a Blu-Ray burner.

  • Why does the PDFs' name change when i view them in the iBooks app?

    i have some past papers and marking schemes in my iTunes library....when i sync them to my iPad, they appear just fine....they are there just the way i named them and all...
    but when i open them, the name changes to some coded-ish name with lots of numbers and all that....
    is it possible for me to change some setting and save the name i want for those PDFs? Or am I going to have to live with this madness?
    please help!

    Hello, I wanted to follow up on this issue after reviewing some of the changes with the current update. [https://bugzilla.mozilla.org/show_bug.cgi?id=1049521] This bug addressed some Windows HKEYs that are changed when Firefox is updated/or installed.
    As an update, a patch has been made and changes are on the way for fresh installs of Firefox :-)

  • Why does the elements 13 change resolution when going into the editor -- it is huge and unusable

    why does the elements 13 change resolution when going into the editor? -- it is huge and unusable

    Many mysteries...
    Which is your OS version ?
    Your screen is 1920 by 1080 pixels.
    The problem appeared after having worked normally.
    When we select a picture from the organizer (album) and click on the edit button.  The editor software changes the entire computer resolution from 1920 x 1080 to   640 x 480 (very unusable).
    That's not clear for me: did you click on the 'Edit' button on the bottom right part of the organizer, or did you use the menu or the right click popup menu to open the editor? In the second case, you are in the editor workspace.
    We tried right clicking on the Elements 13 icon, select properties and under compatibility we made sure that "run in 640 x 480 screen resolution" was de-selected, and it was.    Cannot find any properties window for the editor?  
    The editor has its properties in the 'Edit/preferences' menu, but there is nothing about resolution there.
    Just to be sure : when you are in the organizer with the left 'Folders' panel shown, you highlight one of those pictures to edit. Then you right click and choose to "go to folder". Do the images are shown as 'offline' ? If that is the case, the original are on an external drive which is not connected, and what you are seeing is a 'preview' copy on your computer with 640 x 480 resolution.

  • Why does the clone stamp work when I go from a darker colour to a lighter colour but not the other way around. How can I lighten up a dark area? Lasso tool takes from the wrong area too.

    Why does the clone stamp work when I go from a darker color to a lighter color but not the other way around? How can I lighted a dark area? The Lasso tool takes from the wrong area.

    c.pfaffenbichler wrote:
    Why do you use the Blend Modes Lighter and Darker at all in this case and not simply Normal?
    And what kept you from posting a screenshot?
    I borrowed the image below for an HDR workshop I ran at the 2010 PSNZ National Convention, to demonstrate a method of removing halos.  You'll remember that halos were a serious problem with early HDR, and while the halos in this image were caused by over sharpening, they are perfect for demonstrating this technique.
    It relies on the fact that halos so often tend to put a lighter tone between the two areas where sharpening is being applied. Whether that is the sky abutting a dark line of hills, or the rock and little tower as in this image.  I've uploaded it at the size it was supplied to me at (about 2700 pixels wide).  So
    Click to open the full image, right click and copy, and paste into Photoshop.
    Select the clone tool, and set its blend mode to Darken.
    Try to sample on a line horizontal to where you want to clone, to give the best tonal match, and start cloning.
    Because the sky is darker than the halo, it overwrites it. But the rock is darker than the sky, so it has no affect.
    It works even better if you clone on a new layer also set to Darken.  No masking, just Photoshop blend mode magic.
    You can also fix the little tower. Use a great big brush — just remember to sample horizontal to match the horizon.
    Back then I was using the same trick with CAs after forgetting to fix them in ACR, and having done too much work to start again after spotting the problem.

  • Why does the iPod duplicate songs when updating my playlists?

    Why does the iPod duplicate songs when updating my playlists? Also, you cannot use the "show duplicate songs" feature on the iPod - I suppose that is because it is not supposed to duplicate songs on the iPod. But, if that is the case - why does it do it?

    Try resetting your iPod, press and hold the power and the home buttons together approximately 15 seconds until the Apple logo appears. If that does not work try going into Settings>General>Reset>Reset All Settings. If that does not work try connecting to you iTunes library via the cable and un-sync the library from your iPod then sync the library.  For the next 2 options backup your iPod first, then do a Restore iPod from backup, if that doesn't work... As a last resort Restore your iPod as New. I too had the red circle and square after updating to 7.0.4 the last resort fixed mine, others have reported doing all the above, all have had reports of fixing the problem and not fixing it. Give it a try, hopefully one of these works, Good luck.

  • Why does the purchase verification appear when I download free app?

    Why does the purchase verification appear when I download free app?

    Is this what you mean...
    apple_prompting_some_users_for_extra_app_store_security_details

  • Why does the keyboard show up when i read a book in Kindle?

    why does the keyboard show up when i read a book in Kindle?
    it blocks about 1/4 of the page. but when i turn the ipad to horizontal it goes away.

    Try these basic things and see if the keyboard goes away for good.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Quit the Kindle App and restart. Go to the home screen first by tapping the home button. Quit/close open apps by e tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus (-) sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Why does the alarm not work when the iphone 4 is turned off

    why does the alarm not work when the iphone 4 for is  turned  off works fine when on most other phones work when off

    The only phone I've ever had that would turn on and sound the alarm is a Blackberry. So, I'd hardly say "most phones" have this function.

  • Why does the mail not work when i updated my 5s to iOs 8?

    why does the mail not work when i updated my 5s to iOs 8?

    Thank you for the reply. But can you tell me what this configuration is about and how I should do this?

  • Why does the keyboard shows up when i read a book in Kindle?

    why does the keyboard shows up when i read a book in Kindle?

    Try these basic things and see if the keyboard goes away for good.
    Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons.
    Quit the Kindle App and restart. Go to the home screen first by tapping the home button. Quit/close open apps by e tapping the home button and the task bar will appear with all of you recent/open apps displayed at the bottom. Tap and hold down on any app icon until it begins to wiggle. Tap the minus (-) sign in the upper left corner to close the apps. Restart the iPad. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.

  • Why does the music go off when the screen light is off?

    Why does the music go off when the sceen light goes off

    This is usually an indication that your headphones/earbuds are not plugged all the way in.  Double check the connection and make sure that no metal from the jack is showing.
    B-rock

  • Why does the dashboard come up when I press f12 volume increase?

    Why does the dashboard come up when I press F12, volume increase?

    rkaufmann87 wrote:
    Check System Prefrences (there is no such thing as system settings) - Keyboard - Keyboard - ensure the box called Use all F1, F2 etc. keys as standard function keys is unchecked.
    lol

  • Why does the color wheel appear when i ckick on something abd takes awhile to go away

    content://media/external/file/1892
    why does the color wheel appear when i ckick on something abd takes aabd takes awhile to go away

    All about the Spinning pinwheel [Beach Ball of Death] - Wikipedia - ÇÇÇ

  • Why does the color red change from working with images in develop to library?  The color gets lighter and nothing shows a change on histogram but visually you can see it.

    Why does the color red change from working with images in develop to library?  The color gets lighter and nothing shows a change on histogram but visually you can see it.

    That's probably a broken display profile. The conversion from Library's Adobe RGB is different than the conversion from Develop's linear ProPhoto, so if there's a problem with the display profile it can show up this way.
    Recalibrate, or if you don't have a calibrator use sRGB. If your monitor is a wide gamut model use Adobe RGB.
    Assuming Windows, change it in Control Panel > Color Management > Devices, and relaunch Lightroom so that it can pick up the new profile at startup:

Maybe you are looking for

  • Imovie,unable to prepare project for publishing error -50

    Hi, I'm done editting my video and i have tried all sort to export it( share- media browser, facebook, export, etc) but it keeps on giving this " unable to prepare for publishing - the project could not be prepared for publishing because an error occ

  • What exactly are objects?

    Hi, i am new to java and i do not exactly understand the concept of OBJECTS...they are somehow relates to methods and classes. Is there a place where is can know about objects in java? Maybe someone here can help me..

  • Copying Audio CDs in not-iTunes format--how?

    My MacPro has two optical drives, and I was trying to copy an audio CD from one drive to the other. (Of note, my Preferences do not specify iTunes as the program with which to open audio CDs.) As soon as I insert an Audio CD, all files on the CD seem

  • How do I download pictures that have been text to me.

    How do I download text pictures to my PC?

  • My Adobe Captivate 7 will not open?

    I have an iMac OS X version 10.9.4. I have not used it in a few months. I have uninstalled and reinstalled my captivate it will not open. My other adobe applications work.