0

I have found this but it is supposed to work as swf in the desktop, not in the html.


I am trying to make the content full screen via both at the beginning of the code and mouse event. However stage.displayState returns null. Here is how I do things;

at the beginning: stage.displayStatus = StageDisplayState.FULL_SCREEN_INTERACTIVE;

and then

fullScreenButton.addEventListener(MouseEvent.CLICK, DoFullScreen);

function DoFullScreen(e:MouseEvent)
{
    stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
}

and in the function, stage.displayState traced null as I said before.

Community
  • 1
  • 1
coner
  • 270
  • 7
  • 21

1 Answers1

2

You need to target FP 11.3+ for StageDisplayState.FULL_SCREEN_INTERACTION

for below versions : StageDisplayState.FULL_SCREEN

and you have to add that flash param in your html

<param name="allowFullScreen" value="true" />

I added the sample swf and fla

Özgür Ersil
  • 6,909
  • 3
  • 19
  • 29
  • is param tag independent with that: _"...it is supposed to work as `swf` in the desktop, not in the html."_??? I have tried both `FULL_SCREEN` and `FULL_SCREEN_INTERACTION` but nothing happens. – coner Jun 11 '15 at 09:01
  • if you are trying from flash debugger, it can not work, but if you run your code from exported swf it should work – Özgür Ersil Jun 11 '15 at 09:05
  • My bad I assumed it starts as full screen. When I click the black rectangle, it goes FS. – coner Jun 11 '15 at 09:59
  • i added fla, you can see it works like what you expect – Özgür Ersil Jun 11 '15 at 10:40
  • Things get more and more ridiculous. I have two fla, contents and script etc. exactly same but one functionally handle FS the other is not. Maybe a restart will do the job. @Özgür And thanks for files but this is same what I am doing and failing. – coner Jun 11 '15 at 11:00
  • it seems weird, if i can help with any condition again, feel free to ask – Özgür Ersil Jun 11 '15 at 11:04
  • From a html page a swf can only go FS if the user clicks somewhere. – BotMaster Jun 11 '15 at 12:20