Fullscreen browser in Flash

Here is a nice trick to make flash full screen from browser
Code here is for flash8, soon you can expect for AS3

1) Create New document save it some where in local drive

2) Create button in flash and be sure the button is selected and hit F9
Paste the below code

on (press) {
if (Stage["displayState"] == "normal") {
Stage["displayState"] = "fullScreen";
Stage["displayState"] = "normal"

3) Press Shift + F12 (or) file->publish
This will create swf and html file

4) Edit html file usinh notepad; find param tags add the param tag below to the params in html and save
<param name="allowFullScreen" value="true"/>

5) Run the html

Code Explanation:
Stage["displayState"] this holds the fullsceen or normal value of the flash player
And we simply toggling these values

This will work only if flash player 9, no problem if u have flash8 software

Install flash9_player

Bookmark and Share


Saravanan said...


Nope we cannot edit that..


jdclements said...

Thanks. This worked great.

Anonymous said...

hey cool it works great....:):)

Ilias Sounas said...

It works perfect!
Thank you very much:)

Krista said...

Having some difficulties with doing something this simple could this be because im trying to do this with Adobe Flash CS4?

Sanapala said...

Hi All,

I am facing an issues with the screen resolution. I used this code. When a browser become full screen from flash, it is showing in screen resolutions - 1280 x 720. I want to view it in 1024 x 768 resolutions.

Please help me out.

jonadenathan said...

Great tip Sara, thanks a lot indeed.

But, due that in AS3 you cannot add code directly to an element it instead should go into an actions frame, I took the freedom to adapt it ^^

And here it is in case someone else need it:


buttonName.addEventListener(MouseEvent.CLICK, fullScreen);

function fullScreen(event:MouseEvent):void {

Thanks again.


Recent Posts

Recent Visitors

Donate Me

About Me

My photo
Chennai, Tamil nadu, India
Nothing more to say about me.. Just a Action Script programmer / Flex developer having 4.5 years of experience.