• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Full screen in AS3 - Air

Explorer ,
Jun 19, 2013 Jun 19, 2013

Copy link to clipboard

Copied

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

TOPICS
ActionScript

Views

7.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Jun 20, 2013 Jun 20, 2013

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;

                        

                              stag

...

Votes

Translate

Translate
New Here , Sep 16, 2019 Sep 16, 2019

If you still need your answer:

 

After a search in some forums to solve my question (similar to your) My app can use fullscreen in any "ANY" screen also if is in 16:9 or 18:9 aspect ratio. Here's my question related about yours:
https://forums.adobe.com/thread/2651175

 

Now I have the answer but I can't write there because "forums" already doesn't exist. Now is "comunity".

 

Here is the answer:

go to XML file (manifest or app descriptor), and find: <application>

Put this inside before </application>:

 

<an
...

Votes

Translate

Translate
Community Expert ,
Jun 19, 2013 Jun 19, 2013

Copy link to clipboard

Copied

what's that platform's allowFullScreenInteractive property?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 20, 2013 Jun 20, 2013

Copy link to clipboard

Copied

I am texting the 'app' on my galaxy s4, but would like it to run on any android in general regardless of the screen resolution.

When I simpley export an .apk file from flash woth the stage code or with out the 'app' doesnt fully fit in the screen its to small.

         holder.width = Capabilities.screenResolutionX;

                              holder.height = Capabilities.screenResolutionY;


seemed like a solution but that distorts everything.

allowFullScreenInteractive property

I found on the net as a android property to allow things to be user interactive in air at full screen.

Any advice?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2013 Jun 20, 2013

Copy link to clipboard

Copied

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

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2013 Aug 03, 2013

Copy link to clipboard

Copied

Good morning.

Although i have made a working app in flash cs-6 i don't know much about classes and packages. I have a question. I must make a special package for my flash file (apk) to work in full screen mode or there is already general code that fits to all projects?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2013 Aug 03, 2013

Copy link to clipboard

Copied

you can use the stage's displayState property and use fullscreen or fullscreeninteractive.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2013 Aug 03, 2013

Copy link to clipboard

Copied

Thanks you for your answer. But the problem is that i don't know how to do it. I have read many comments, answers but i still can fix it. Can you please be more specific?

Thank you in advance.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 03, 2013 Aug 03, 2013

Copy link to clipboard

Copied

if(stage.allowsFullScreenInteractive){

stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

} else {

stage.displayState = StageDisplayState.FULL_SCREEN;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 04, 2013 Aug 04, 2013

Copy link to clipboard

Copied

Thank you again for your answer.

I copy the code (press F9), and i create the apk file with air 3.4 (full screen option) but nothing happened. Again it doesn't work in full screen mode. I tested it in a galaxy S3 and in a samsunf galaxy tab 2 10.1. Do you have any suggestions? Or maybe to send you the .fla file to see what is wrong?

Thank you in advance!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 04, 2013 Aug 04, 2013

Copy link to clipboard

Copied

add this to your application descriptor file:

<fullScreen>true</fullScreen>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 04, 2013 Aug 04, 2013

Copy link to clipboard

Copied

Hello again!

I have already try it:

<initialWindow>

    <content>metrao_zoakia.swf</content>

    <systemChrome>standard</systemChrome>

    <transparent>false</transparent>

    <visible>true</visible>

    <fullScreen>true</fullScreen>

    <renderMode>cpu</renderMode>

    <autoOrients>true</autoOrients>

    <aspectRatio>landscape</aspectRatio>

  </initialWindow>

but nothing happened...

Do you want to have a look in the .fla file?

Thank you again for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 04, 2013 Aug 04, 2013

Copy link to clipboard

Copied

i don't download and correct files unless i'm hired.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 04, 2013 Aug 04, 2013

Copy link to clipboard

Copied

Good morning. Do you want to send you my personal email to send me details about the price you want and how i will give you the money?

Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 05, 2013 Aug 05, 2013

Copy link to clipboard

Copied

you can send an email via contact at, http://www.kglad.com

but you can continue to get free help via the adobe forums:  you can use the trace function (with adobe scout) or use a textfield to check if fullscreen is allowed on your device.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 16, 2019 Sep 16, 2019

Copy link to clipboard

Copied

If you still need your answer:

 

After a search in some forums to solve my question (similar to your) My app can use fullscreen in any "ANY" screen also if is in 16:9 or 18:9 aspect ratio. Here's my question related about yours:
https://forums.adobe.com/thread/2651175

 

Now I have the answer but I can't write there because "forums" already doesn't exist. Now is "comunity".

 

Here is the answer:

go to XML file (manifest or app descriptor), and find: <application>

Put this inside before </application>:

 

<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<!-- other tags here -->
<application android:hardwareAccelerated="true">
<!-- this lets you support devices larger than 16:9 ratio -->
<meta-data android:name="android.max_aspect" android:value="2.16" />
</application>
</manifest>
]]>
</manifestAdditions>
</android>

 

It will work. I'm glad. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 09, 2022 Aug 09, 2022

Copy link to clipboard

Copied

LATEST

Big thanks bro, my problem solved😀

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines