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

Stage - Adobe ActionScript® 3 (AS3 ) API Reference

Explorer ,
Oct 01, 2012 Oct 01, 2012

This question was posted in response to the following article: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Stage.html

TOPICS
ActionScript
3.6K
Translate
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 ,
Oct 01, 2012 Oct 01, 2012

This document refers to a property stage.allowsFullScreenInteractive from FP 11.3. When I include the below code, the movie compiles without errors.

if(stage.allowsFullScreenInteractive)

However, when I play the movie in the browser debug player (11.4), I keep getting the following error:


ReferenceError: Error #1069: Property allowsFullScreenInteractive not found on flash.display.Stage and there is no default value.

Could someone please advice if this property can be retrieved in the activeX and plugin versions of FP 11.4?

Also, setting the stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE seems to only work for the Plugin on Firefox and Chrome browsers but has no effect in the IE ActiveX plugin. Is this a known bug?

Thanks,
Saravanan

Translate
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
Adobe Employee ,
Oct 01, 2012 Oct 01, 2012

@Saravanan,

Let me ask around.

Regards,

Randy Nielsen

Senior Content and Community Manager

Adobe

Translate
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
Adobe Employee ,
Oct 02, 2012 Oct 02, 2012

Instead of if(stage.allowsFullScreenInteractive), can you try:

if stage.displayState == StageDisplayState.FULL_SCREEN_INTERACTIVE

Also, setting it in IE ActiveX works.  Did you apply it to a key press or mouse event?  For example:

//button for full screen interactive mode

Btn.addEventListener(MouseEvent.CLICK, fullScreenInteractive);

//full screen interactive mode

function fullScreenInteractive(event:MouseEvent):void {

    stage.displayState=StageDisplayState.FULL_SCREEN_INTERACTIVE;

}

Translate
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 ,
Oct 02, 2012 Oct 02, 2012

stage.displayState == StageDisplayState.FULL_SCREEN_INTERACTIVE will only evaluate if stage.displayState is set to fullscreen interactive currently.

I am in effect trying to identify whether the current stage (running in a browser) allows Fullscreen Interactive mode or not so I can dynamically show or hide the fullscreen button in my application. I believe the purpose of this new property stage.allowsFullScreenInteractive is to detect whether the client environment allows switching to fullscreen interactive mode before a attempt can be made to switch stage.displayState in a MouseEvent.

About the FULL_SCREEN_INTERACTIVE not working in IE, yes I have the following function called from a mouse event. This works as expected in both Firefox and Chrome but not in IE 9. I am using the latest IE 9.0.10 update on Windows 7 (x64)

function toggleFullScreen(e:MouseEvent):void {

switch(stage.displayState) {
    case StageDisplayState.NORMAL:
       try{
           stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
       }catch(e:Error){
          stage.displayState = StageDisplayState.FULL_SCREEN;
       }  
       break;
   case StageDisplayState.FULL_SCREEN_INTERACTIVE:
   default:
       stage.displayState = StageDisplayState.NORMAL;   
       break;
    }
  
}

Translate
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
Adobe Employee ,
Oct 02, 2012 Oct 02, 2012

stage.allowsFullScreenInteractive is not a property to detect whether the client environment allows switching to fullscreen interactive mode before a attempt can be made to switch stage.displayState in a MouseEvent.

The actual use of this property is:  First, after switch stage to full screen interactive, user has to accept being able to input text in full screen interactive mode.  When the user clicks on the Allow button to accept inputting text, then stage.allowsFullScreenInteractive returns true.  So, unless stage is already in full screen interactive mode, you cannot detect the flag for stage.allowsFullScreenInteractive.

If full screen interactive is not working in IE, can you verify that for IE, you have parem:  <param name="allowFullScreenInteractive" value="true", such as below:

<body>
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="325" id="testID" align="middle">
<param name="movie" value="test.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#cccccc" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="true" />
<param name="allowFullScreenInteractive" value="true" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="test.swf" width="400" height="325">
<param name="movie" value="test.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#cccccc" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="wmode" value="window" />
<param name="scale" value="showall" />
<param name="menu" value="true" />
<param name="devicefont" value="false" />
<param name="salign" value="" />
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="true" />
<param name="allowFullScreenInteractive" value="true" />
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>

Please contact me directly with your contact info so that we can get to the bottom of this.  Thank you!

Translate
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 ,
Oct 23, 2012 Oct 23, 2012

Hi!

I discovered a very strange thing. Application with allowsFullScreenInteractive is compiled correctly, but when trying to read this property an error is occured:

ReferenceError: Error #1069: Property allowsFullScreenInteractive not found on flash.display.Stage and there is no default value. I'm compiling with Adobe® Flash® Builder™ 4.6, flex sdk 3.6A with playerglobasl.swc v. 11.4 (also tried with v.11.3). This property could not be accessed before entering full screen interactive, after entering full screen interactive and after user has accepted full screen interactive (pressed "Allow" button). You can take a look at my test application at https://rapidshare.com/files/438718333/FullScreenInteractiveTest.zip. Please, let me know what you think about this strange behaviour.

Translate
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 ,
Oct 23, 2012 Oct 23, 2012
LATEST

Forgot to attach source code:

package

{

          import flash.display.Sprite;

          import flash.display.StageDisplayState;

          import flash.events.Event;

          import flash.events.FullScreenEvent;

          import flash.events.MouseEvent;

          public class FullScreenInteractiveAs3Test extends Sprite

          {

                    public function FullScreenInteractiveAs3Test()

                    {

                              var but:Sprite = new Sprite();

                              but.graphics.beginFill(0xff0000, 1);

                              but.graphics.drawRect(0, 0, 100, 30);

                              but.graphics.endFill();

                              but.addEventListener(MouseEvent.CLICK, this.butClickHandler);

                              this.addChild(but);

                              this.addEventListener(Event.ADDED_TO_STAGE, this.stageAddedHandler);

                    }

                    private function stageAddedHandler(evt:Event):void

                    {

                              this.stage.addEventListener(FullScreenEvent.FULL_SCREEN, this.fullScreenHandler);

                              this.stage.addEventListener(FullScreenEvent.FULL_SCREEN_INTERACTIVE_ACCEPTED, this.fullScreenInteractiveHandler);

                    }

                    private function fullScreenHandler(evt:FullScreenEvent):void

                    {

                              trace("=== full screen mode changed");

                              switch(this.stage.displayState)

                              {

                                        case StageDisplayState.FULL_SCREEN_INTERACTIVE:

                                                  trace("----- now in full screen interactive mode");

                                                  try

                                                  {

                                                            trace("--- user allows full screen interactive '" + this.stage.allowsFullScreenInteractive + "'");

                                                  }

                                                  catch(e:Error)

                                                  {

                                                            trace("--- property 'allowsFullScreenInteractive' is NOT accessible!");

                                                  }

                                                  break;

                                        case StageDisplayState.FULL_SCREEN:

                                                  trace("--- now in full screen mode");

                                                  break;

                                        case StageDisplayState.NORMAL:

                                                  trace("--- now in normal mode");

                                                  break;

                              }

                    }

                    private function fullScreenInteractiveHandler(evt:FullScreenEvent):void

                    {

                              trace("=== full screen interactive accepted, allows full screen '" + this.stage.allowsFullScreenInteractive + "'");

                    }

                    private function butClickHandler(evt:MouseEvent):void

                    {

                              trace("=== but click handle");

                              try

                              {

                                        this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

                                        trace("--- set to full screen interactive");

                              }

                              catch(e:Error)

                              {

                                        this.stage.displayState = StageDisplayState.FULL_SCREEN;

                                        trace("--- set to full screen");

                              }

                    }

          }

}

Translate
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