Full screen in AS3 - Air

Hi I am trying to the get my andoid app to show up full screen. But this doesnt work.
My stage is 480x800
And this is the code that I attempted to use:
package
          import flash.display.MovieClip;
          import com.greensock.*;
          import com.greensock.easing.*;
          import flash.events.MouseEvent;
          import flash.system.Capabilities;
          import flash.display.StageDisplayState;
          import flash.display.StageScaleMode;
          import flash.display.StageAlign;
          public class mainclass extends MovieClip
                    private var holder:holder_mc = new holder_mc  ;
                    private var btn:BTN = new BTN  ;
                    private var side1:side_mc = new side_mc  ;
                    private var side2:side_mc = new side_mc  ;
                    public function mainclass()
                              super();
                              stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
                              stage.showDefaultContextMenu = false;
                              stage.scaleMode = StageScaleMode.NO_SCALE;
                              stage.align = StageAlign.TOP_LEFT;
                              holder.width = Capabilities.screenResolutionX;
                              holder.height = Capabilities.screenResolutionY;
                              addChild(holder);
                              trace(holder.width)
                              trace(stage.stageWidth)
                              btn.x = 250;
                              btn.y = 300;
                              holder.addChild(btn);
                              side1.width = holder.width / 2;
                              side1.height = holder.height;
                              side1.x =  -  side1.width;
                              side1.y = 0;
                              holder.addChild(side1);
                              side2.width = holder.width / 2;
                              side2.height = holder.height;
                              side2.x = holder.width + side1.width;
                              side2.y = 0;
                              holder.addChild(side2);
                              //btn.addEventListener(MouseEvent.CLICK, closedoors);
                    private function closedoors(e:MouseEvent):void
                              btn.removeEventListener(MouseEvent.CLICK, closedoors);
                              TweenLite.to(side1, .8, {x:0, ease:Bounce.easeOut});
                              TweenLite.to(side2, .8, {x:side2.width, ease:Bounce.easeOut});
                    private function opendoors():void
                              TweenLite.to(side1, .8, {x:-side2.width, ease:Bounce.easeOut,delay:.3});
                              TweenLite.to(side2, .8, {x:stage.stageWidth, ease:Bounce.easeOut,delay:.3,onComplete:addList});
                    private function addList():void
                              btn.addEventListener(MouseEvent.CLICK, closedoors);
Any help is much appriciated.
Thx pavel

you should check the allowFullScreenInteractiveProperty to see if the device allows fullscreeninteractive.  if it does, go fullscreeninteractive. if it does not, change your scalemode:
public function mainclass()
                              super();
stage.showDefaultContextMenu = false;
if(allowFullScreenInteractiveProperty){
                              stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
                              stage.scaleMode = StageScaleMode.NO_SCALE;
} else {
stage.scaleMode=Stage.ScaleMode.SHOW_ALL

Similar Messages

  • Here is how to enable full screen mode for AIR Mac Desktop Apps

    I just discovered that with a very simple native extension method, I can enable full screen mode for AIR Mac Desktop Applications.
    This gets you the full screen icon in the top right, and it works perfectly with no changes to my code. (Obviously only works on Lion and above, since this is a Lion feature)
    Enjoy.
    Here's the code:
        FREObject _EnableFullScreenMode(FREContext ctx, void* functionData, uint32_t argc, FREObject argv[])
            //We should be okay to do this, even on 10.6, according to this post:
            //http://www.cocoabuilder.com/archive/cocoa/311124-implementing-full-screen-for-10-7-but-app-should-also-run-on-10-6.html
            //We can't use [NSApp mainWindow] - didn't appear to work
            //This seems to though:
            NSArray * allWindows = [NSApp windows];
            if (allWindows.count > 0)
                NSWindow *mainWindow = [allWindows  objectAtIndex: 0];
                NSWindowCollectionBehavior behavior = [mainWindow collectionBehavior];
                behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
                [mainWindow setCollectionBehavior:behavior];
            //TODO: Return a boolean instead depending on if we found the main window
            return NULL;

    Press Control + Command + F on your keyboard to enter or exit full screen mode.

  • HT204291 How does one get full screen when using air play on my tv from my iPad,thanks in advance

    How does one get a full screen when using air play on my tv when I'm mirroring,.? Thanks in advance

    The iPad's display is 4:3, so it cannot fill your TV screen, which is 16:9
    The only way is to change your TV settings and stretch the image.

  • Air For Android - Full Screen not working

    Opened CS5.5 > Chose "Air For Android" which gave me a stage dimension of 480x800 default. I then created my app.
    I am using a Droid Bionic and testing my app on it. It will not go to full screen, regardless of how I am holding the Droid. When publishing, I clicked "Full Screen" and Portrait, Landscape, Auto Orientation, etc. I tried all of the publishing options, yet still there is white screen on the eastern and southern side of the screen.
    I have a picture on the main screen, and it fits perfectly within the 480x800 dimmensions when playing in Flash. After publishing to an APK file and testing it on Droid, I have that white space as mentioned, as if the stage size grew larger than the picture / app. I also shrank the stage(480x800) dimensions to to (340x600) , but still the same amount of white space. When I move the picture to the right a bit, and publish, it shows the white space on the left hand side of the stage. This can only mean that when I publish, the stage size grows but everything on the stage stays the same. 
    Any ideas?
    Thanks!

    I removed:
    stage.scaleMode = StageScaleMode.NO_SCALE;
    stage.align = StageAlign.TOP_LEFT;
    from AS3 and it works better. Now there is even white space on the north and south side of the screen. Clicking "Full Screen" in the publish settings, makes a little more white space, which is weird. It as if now the stage is expanding its height, rather than its height and width due to me using the above code. Still, would like to get rid of that extra white space.
    Edit: It looks like the stage height grew by 60. If I expand the picture by 60, placing it on the stage at 0x and -30y, it fits fine on the bionic. I don't understand why this is happening, and scared that it may be different for each device.

  • Problem in making air application in full screen on load

    Hi all
      I am new in flex developing. The problem I m facing in making a air application is that I want to make the application window in full screen view without the top toolbar.
    The code i got is like:
    <mx:Button label="fullscreen" click="stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;"/>it is working on click the button.
    But I want this on starting the application. Without any user interface.
    Thanks and Regards

    Extensions require both native code and ActionScript code and are packed by the native extension compiler by Adobe to an ANE file. Check this tutorial: http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html
    After compiling the extension, you can put the extensionId into your <extensions> branch in the application.xml and add the .ane as an excluded library into your AS3 project. Then you can use the extension like any other external library (swc file).
    It's also helpful to download and play around with extisting ANEs. There are some nice open source libraries here: https://github.com/freshplanet

  • Adobe AIR HTML Native Full Screen on Mac OS X

    I am building an application in Adobe AIR for Mac in HTML/JavaScript.
    What I want to do is when the application loads, make the application go into full-screen mode using the correct native full-screen found in OS X Lion and above.
    e.g.
    This is NOT using the displayState that Flash/Flex uses.
    If the users decides to exit full screen mode they will see the app in a native window and can re-enter full screen mode using the icon you get in the top-right of a window.
    I've found some information about an extension here: http://forums.adobe.com/thread/1209193
    FREObject _EnableFullScreenMode(FREContext ctx, void* functionData, uint32_t argc, FREObject argv[])
            //We should be okay to do this, even on 10.6, according to this post:
            //http://www.cocoabuilder.com/archive/cocoa/311124-implementing-full-screen-for-10-7-but-app-should-also-run-on-10-6.html
            //We can't use [NSApp mainWindow] - didn't appear to work
            //This seems to though:
            NSArray * allWindows = [NSApp windows];
            if (allWindows.count > 0)
                NSWindow *mainWindow = [allWindows  objectAtIndex: 0];
                NSWindowCollectionBehavior behavior = [mainWindow collectionBehavior];
                behavior |= NSWindowCollectionBehaviorFullScreenPrimary;
                [mainWindow setCollectionBehavior:behavior];
            //TODO: Return a boolean instead depending on if we found the main window
            return NULL;
    That looks to do what I want! But after reading the Adobe AIR docs I can't get my head around where this code should live in my app directory and how I can call it on app load.
    So in my index.html I have:
    $(document).ready(function() {  // Make window full-screen // CALL THE EXTENSION TO MAKE THE APPLICATION FULL_SCREEN  // Make window active window.nativeWindow.activate();  // Make it visible window.nativeWindow.visible = true;  });
    The initialWindow is not visible by default using <visible>false</false> in the application descriptor XML file. And is made visible and active on the document ready as shown above.
    The missing piece is loading in the extension and making the window go native full-screen.
    To break this question up:
    Where does the extension code go? E.g. do I create an extension file and put it in any particular location in the app directory?
    How do I then load the extension into the application
    Finally how do I then do the full-screen on document ready
    What happens in OS X below Lion? How did full-screen work before it was introduced?
    Hopefully I can get pointed in the right direction as the docs have totally baffled me and don't explain how the extension file is created (to me at least).

    Extensions require both native code and ActionScript code and are packed by the native extension compiler by Adobe to an ANE file. Check this tutorial: http://www.adobe.com/devnet/air/articles/building-ane-ios-android-pt1.html
    After compiling the extension, you can put the extensionId into your <extensions> branch in the application.xml and add the .ane as an excluded library into your AS3 project. Then you can use the extension like any other external library (swc file).
    It's also helpful to download and play around with extisting ANEs. There are some nice open source libraries here: https://github.com/freshplanet

  • Macbook air mini dp output resolution / full screen app issues

    I've successfully connected my new macbook air 13" to my LED tv with a mini DP to hdmi adapter + hdmi wire. I am able to get video and audio (obviously.)
    My issue is that no matter when resolution I try (1080p, 1080i, 720p, etc) and wether I am "mirroring" the display or "extending" the display,
    My samsung 46" LED tv can not get full screen there is always black bars on the left and right.
    When I connect my PC via VGA wire  there are no bars and it is in full land scape view.
    Also I've noticed in lion that full screen apps show up as the "linen wallpaper" on the second display.
    the only way i can slightly alleviate the problem is full screening a video within youtube but not within the OS it self... even then there is still black bars which is weird because when i use the TV as a extended monitor the wallpaper is using the whole display just full screen video has black bars.
    I am unable to get 1920 x 1200 output display to my HDTV is this possible? is it my mini DP to hdmi adapter that is at fault?
    thanks in advanced to whoever helps sorry about the long post my brain is scattered on the issue because my VGA connetion works fine i don't understand why HDMI + mini DP has worse resolution...

    No, it doesn't list the resolution explicitly like that - the top few items in the list are "480i", "480p", "720p", "1080i" and "1080p", each with a small TV icon to the right. Non-television resolutions follow, and are listed with explicit pixel dimensions (and no TV icon), but the list stops at 1440x900, the native resolution of the MacBook's built-in display; it doesn't list resolutions higher than that.
    Needless to say, I've tried every setting in the entire list, and they all suffer from the same problem of displaying shrunk down on the plasma TV with a margin around the desktop.
    I wonder if the difference between your Display control panel and mine is that I'm running Snow Leopard? (Sorry - no screen grabs to show, I'm at work right now)

  • Full screen Air app from Flash

    Hi,
    Im using Flash CS3, and I´m trying to make my first AIR
    applications.
    I try to get a full screen view using:
    stage.displayState =
    StageDisplayState.FULL_SCREEN_INTERACTIVE;
    but i only get a full screen window. Can´t get rid of
    the window/menu-bar and the system bar on top (I´m using OSX).
    I think I have to disable the systemChrome, but I can´t
    figure out how to do this from Flash. I´ve seen som AIR
    examples in javacript and flex, but nothing that works for me in
    Flash.
    Best regards
    Peter

    quote:
    Originally posted by:
    petermaseide
    I still also get the top system bar when i run the
    application on OSX, but on WinXP i get a total full screen wiev. I
    think there is a way to get rid of the OSX bar and obtain a real
    full screen on a mac, but I can´t figure it out from the
    documentation.
    Has anyone found a way to remove the top menu in OS X? I am
    converting a presentation tool created as a Flash executable to
    AIR, so that the client can do more with the tool. The tool is used
    to pitch clients and they want a true full screen experience on the
    Mac. I have been trying for hours, scouring online and through help
    files for the answer and cannot find it. Any help would be greatly
    appreciated.

  • MacBook Air Full Screen Display

    Why does my MacBook Air not go full screen when the display is set at 1440 x 900?  I have to set the display at 1024 x 640 to get a full screen display.  Thanks.

    Hi forever free,
    I apologize, I'm a bit unclear on the exact nature of your issue. Depending on your model of MacBook Air (post-2010), the native fullscreen resolution should be 1440 by 900 (16:10 aspect ratio) for the 13 inch and 1366 by 768 (16:9 aspect ratio) for the 11 inch. You may find the following articles helpful:
    Apple - MacBook Air - Technical Specifications
    https://www.apple.com/macbook-air/specs.html
    OS X Mavericks: Adjust your display resolution
    http://support.apple.com/kb/PH14388
    Regards,
    - Brenden

  • Air application full screen error in Mac OSX 10.7 Lion

    Hi
       We have an air application built using Flash Builder 4.5 with 4.5 SDK.
       The air application no problem to run on Windows and Mac OSX 10.6 Snow Leapard. However it has full screen issue on Mac OSX 10.7 Lion. When change to full screen mode, the whole screen disappear, press ESC and turn back to normal stage without any issue.
       We then use Flash Builder 4.5 with SDK 4.6 to compile and release, install the air application to Lion OS but still no luck.
       Air 3.1 installed on Lion OS
       Can some one please help?

    Is this still a problem?

  • How can I have full screen while using yahoo or safari on my iPad air 2

    How can I have full screen on my iPad air 2 with out having bookmarks as part of the screen

    Try quitting Safari like I describe, then reset the iPad. Double click the Home button to show the screen with running and recently used apps. Each app icon will have a sample page above it. Flick up on the page (not the app icon) and the page will fly away and the app icon will disappear. This quits that app. Then Press and hold both the Home button and the Sleep/Wake button continuously until the Apple logo appears. Then release the button and let the device restart. You will not lose data doing this. It's like a computer reboot.
    I would also suggest that you check to make sure that you have enough free space on your iPad for it to run efficiently. With iOS 8 it is recommended that you have 15-20% of the storage space on the device free.  For a 16 GB device that is 2.4-3.2 GB free. For a 32 GB device that is 4.8-6.4 GB free. For a 64 GB device that is 9.6-12.8 GB free.

  • Kindle Fire and Adobe Air plug in + Air 2.7 + gpu + landscape + full screen

    Alright I got a couple of issues here.
    First I was on air 2.7 trying to convert an app that is designed to run in gpu mode, in landscape orientation, and full screen, well this is a known bug on 2.7 and the work arounds I found did not solve my problems or I was not clear on implementing them.
    Then I figured I go 3.1, surely that issue is fixed by now, run the app on my Kindle Fire and it tells me my air is out of date so it prompts me to go to the Amazon app store for an update except when I do it just takes me to the free app of the day page and I can't manually find the air app through the built in amazon app store, I see it on the web version but cannot download it, and if I am having this problem all the users will too so some solution like getting it off the android market and putting on the fire manually is useless.
    It seems that there is no plug in available on the amazon app store that will allow the fire to run applications built in 3.1, is this true? I've seen a few posts regarding this. And if true, why and when will this be fixed? I wasted a day with this problem when I could have been doing some design.
    Any ideas or suggestions are welcome.

    A word of caution:
    the Amazon Appstore checks for Kindle Fire support AFTER it accepts app updates.  So a developer can unknowingly break KF support, and still get app updates accepted into the store!
    Here is an e-mail I just sent to Amazon's KF team:
    FYI, there is a significant loophole in your submission pipeline:
    1) All my apps use Adobe AIR.
    2) For the longest time, they were all compiled with AIR 2.7 so there was no problem.  I got a bunch of downloads, including from Kindle Fire users.
    3) A week ago, I updated most of my apps to AIR 3.1, and broke Kindle Fire support, without my realizing it, because I didn't know that the KF only supports AIR 2.7.  Unfortunately, all the updates with broken KF support were accepted into the store!!!
    4) Now I am getting users complaining that their apps no longer work on Kindle Fire.
    What should have happened: NONE of the updates should have been accepted after it was realized by your review team that they broke Kindle Fire support, while previous versions worked fine on it and KF users downloaded them.  Reviewing KF support separately, after the initial review/acceptance, is not a good process!
    In any case, I have re-submitted all my apps with the release note 'Restored Kindle Fire support'.  What I did was use 'captive runtime' for compiling all my AIR 3.1 apps, which normally means that the app will not require an external AIR runtime to function.  Hopefully, this will work this time.  If not, I am going to have to re-compile everything using AIR 2.7, which is a major drag since some of the features I depended on are part of AIR 3.1.

  • Whenever I switch on my iPad Air , I am presented with a full screen of a blue sky, white clouds and stars, which I cannot get out of.  How do I do so?

    Whenever I switch on my iPad Air, I am presented with a full screen piture of a blue sky, stars and white clouds, which I cannot get out of.  How do I do so, please? 

    Sorry, please ignore this question.  I have just realised that the answer is the same as the one I recieved to a previous similar one.

  • Ipad air safari to full screen

    How can I make safari of ipad air into full screen?
    Are their any gestures to close tabs quickly, or switch one tab to another?

    Switch tap; just tab the index on top.

  • Macbook air video flickers full screen Mavericks

    After upgrading to Mavericks I notice that the video flickers and the black bar at the top moves up and down when watching videos in full screen ; an example is the Jony Ive iPad air video or an iTunes movie.  Has anyone else experienced this problem?

    I specifically said - "Thats not to say there isnt a single unit with a GPU/ monitor issue."
    I have the new Air, thanks for asking. Have had roughly 20+ new 2013 Air thru my hands;...videos play fine on same.
    Contact Apple and make an appt. if your specific Air is experiencing an issue.
    Your warranty entitles you to fast service and resolution of any issue you make have with your Air notebook.
    Peace

Maybe you are looking for

  • Report tree issue

    I am trying to change the discription in the report tree that has been built. As of now the report tree shows the description which is linked to the reports. My issue is that i need to give some other description and not the one which is linked to th

  • Analog to Digital capture issue

    Not finding my answer after looking through this forum I am posting question. I have successfully bridged a Sony Digital8 TRV330 through my SonyTRV50 to capture analog Hi8 video but cannot get capture to work in FCP 7.0.2 I have set to non controllab

  • My purchased items are not available in iTunes

    None of my purchased items are showing up in the iTunes Store. Is anyone else having this problem, or is it just me? Thanks! This problem shows up on my iPhone 4S (with latest software update), Apple TV 3 (latest software update) and my MacBook Pro (

  • Shockwave to Javascript - character encoding issue !

    Hi ! I have resigned from sending messages from JavaScript to Shockwave movie as I have found all existing methods unreliable (at worst scenario Flash blocker is installed and using localConnection trick with Flash gateway fails). But in the conseque

  • OLS Policy Predicate Error

    I applied an OLS policy to a table with a predicate but following error is returned. Is it a syntax error?? Any help is appreciated. Here it is: SQL> BEGIN 2 SA_POLICY_ADMIN.APPLY_TABLE_POLICY 3 (policy_name => 'DBSEC', 4 schema_name => 'Robert', 5 t