Here is a quick post on using Flash Player 9’s Full-Screen Mode in Flex. I’ve seen this appear a few times in the bugbase and on lists, but here is some simple code to let you toggle between “full screen mode” and “normal mode” in a Flex application. Note that in this example I’m listening for the applicationComplete event in the main <mx:Application /> tag instead of the creationComplete event. The applicationComplete tag is called slightly after the creationComplete event, after the Application has been completely initialized.
If you try and access the Application.application.stage property from the creationComplete event, you’ll get a run-time error (RTE) saying the following:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at main/init()
at main/___main_Application1_creationComplete()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at mx.core::UIComponent/set initialized()
at mx.managers::LayoutManager/doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()
at mx.core::UIComponent/callLaterDispatcher()
The example below is pretty bare with just a few Label controls and a Button control, but it should have enough of the required code to give you a push in the right direction.
Full code after the jump.
You must have version 9,0,28,0 or greater of Flash Player installed to use full-screen mode. Download the latest version of Adobe Flash Player.
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applications/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init(event)">
<mx:Script>
<![CDATA[
import flash.display.StageDisplayState;
private function init(evt:Event):void {
/* Set up full screen handler. */
Application.application.stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenHandler);
dispState = Application.application.stage.displayState;
}
private function fullScreenHandler(evt:FullScreenEvent):void {
dispState = Application.application.stage.displayState + " (fullScreen=" + evt.fullScreen.toString() + ")";
if (evt.fullScreen) {
/* Do something specific here if we switched to full screen mode. */
} else {
/* Do something specific here if we switched to normal mode. */
}
}
private function toggleFullScreen():void {
try {
switch (Application.application.stage.displayState) {
case StageDisplayState.FULL_SCREEN:
/* If already in full screen mode, switch to normal mode. */
Application.application.stage.displayState = StageDisplayState.NORMAL;
break;
default:
/* If not in full screen mode, switch to full screen mode. */
Application.application.stage.displayState = StageDisplayState.FULL_SCREEN;
break;
}
} catch (err:SecurityError) {
// ignore
}
}
]]>
</mx:Script>
<mx:String id="dispState" />
<mx:Label text="width={Application.application.width}" />
<mx:Label text="height={Application.application.height}" />
<mx:Label text="displayState={dispState}" />
<mx:Button label="Toggle fullscreen" click="toggleFullScreen()" />
</mx:Application>
View source is enabled in the following example.
For more information on Full Screen Mode in Flash Player 9 (ActionScript 2.0 and ActionScript 3.0) check out the following article on the Adobe Developer Center: “Exploring full-screen mode in Flash Player 9″.
I *knew* I would have forgotten something. The real trick to using FullScreen support is to enable it in the JavaScript embed code, or <object /> and <embed /> tags… So, in your HTML wrapper, add the following property:
AC_FL_RunContent(
"src", "main",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "main",
"quality", "high",
"bgcolor", "#869ca7",
"name", "main",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer",
"allowFullScreen", "true"
);
Or, if you are using <object /> and <embed /> tags, you can use the following syntax instead:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="main" width="100%" height="100%"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="main.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#869ca7" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="true" />
<embed src="main.swf" quality="high" bgcolor="#869ca7"
width="100%" height="100%" name="main" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
allowFullScreen="true"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
Also, I just learnt from my co-worker Raghu’s blog (“FLEXing My Muscle” and his “Error on adding FullScreenListener in creationComplete handler” post) that you can use the SystemManager class instead of all my references to Application.application. Thanks Raghu!
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applications/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="init()">
<mx:Script>
<![CDATA[
import flash.display.StageDisplayState;
import mx.managers.SystemManager;
private function init():void {
/* Set up full screen handler. */
systemManager.stage.addEventListener(FullScreenEvent.FULL_SCREEN, fullScreenHandler);
dispState = systemManager.stage.displayState;
}
private function fullScreenHandler(evt:FullScreenEvent):void {
dispState = systemManager.stage.displayState + " (fullScreen=" + evt.fullScreen.toString() + ")";
if (evt.fullScreen) {
/* Do something specific here if we switched to full screen mode. */
} else {
/* Do something specific here if we switched to normal mode. */
}
}
private function toggleFullScreen():void {
try {
switch (systemManager.stage.displayState) {
case StageDisplayState.FULL_SCREEN:
/* If already in full screen mode, switch to normal mode. */
systemManager.stage.displayState = StageDisplayState.NORMAL;
break;
default:
/* If not in full screen mode, switch to full screen mode. */
systemManager.stage.displayState = StageDisplayState.FULL_SCREEN;
break;
}
} catch (err:SecurityError) {
// ignore
}
}
]]>
</mx:Script>
<mx:String id="dispState" />
<mx:Label text="width={Application.application.width}" />
<mx:Label text="height={Application.application.height}" />
<mx:Label text="displayState={dispState}" />
<mx:Button label="Toggle fullscreen" click="toggleFullScreen()" />
</mx:Application>



good example, I didn’t know the difference between “applicationComplete” and “creationComplete” untill saw you tutorial.
thank you!
Your blog is pretty awesome: this entry in particular. Application Complete, who knew? With that said, I keep getting a 1046 error relating to the evt:FullScreenEvent, around line 8. The exact diagnostic is…
1046: Type was not found or was not a compile-time constant: FullScreenEvent.
Any idea what the problem might be?
Hi, i’ve tried the code but i get a “Error #2152: Full screen mode is not allowed” in Firefox 2.0.0.6 and IE 7. The funny thing it’s that it runs ok when using it from your site. So i guess it’s not a browser security/config related problem.
Can you help me out ? thanks in advance !! great work and great site !!!!!!!!!!
li wenzhi,
There is a really good article over at Wietse Veenstra’s blog on “Understanding the Flex Application startup event order” which describes the order in which the various events (preinitialize, initialize, creationComplete, updateComplete and applicationComplete) get called. It’s a very good read and I highly recommend it.
Lively & Co,
If you are using the Adobe Labs version of Flex Builder 3, there was a bug (SDK-11792: “Class Missing: flash.events.FullScreenEvent”) where the FullScreenEvent class wasn’t working in the original beta 1 release. You can fix this by downloading and installing a newer nightly build of the Flex 3 SDK.
Lucio,
Sorry, I forgot to mention that you have to edit the HTML wrapper code to add the “allowFullScreen” property and set it to “true” (it is false by default). I updated the post above. Good catch, thanks.
Thanks ! , now with thew missing html code work great !
This is a cool feature to add to my app, thanks for sharing the trick.
The only problem is that with Flex 2 SDK it works only if I run the application in Debug mode and doesn’t when I run it in release… any ideas?
Thank you!
I’ve had almost the same problem.
Thanks a lot.
irina,
Are you sure both your Debug and Release versions of the Flash Player are 9.0.28.0 or higher? I don’t think I mentioned it above, but I should update the post to mention that.
I upgraded Flash player to 9.0.47.0 and still have the same problem… When I launch it from Flex 2 Builder in debug - works fine, but when I launch it in release - it doesn’t work… Thank you!
hey, i got it working! i had wmode=opaque parameter set in the html (wasn’t there for debug mode) and that got in a way for some reason, it now works with that attribute removed.
irina,
Thanks for the update.
I checked the online docs and found this quote in the “Exploring full-screen mode in Flash Player 9″ article on the Adobe Developer Center:
I believe the current posted Adobe Flash Player build number on Labs is “9.0.60.120″, which lists among its features and enhancements:
Happy Flexing!
See for dummies like me, if you want me to use that mxml or whatever that actually is, you have to say, put this one here in head, link there, etc. I am lost … I see your example but can’t figure out where and to what to stick this to?
Fortunately the allow full scale = true works good enough …
Just a though, must write to lowest denominator :-)
Thanks do for good blog.
Shamick
Shamick,
Yeah, sorry. It is a bit confusing since full-screen does require a few different moving parts (MXML HTML/JavaScript). But you do have a good point, I should update the ZIP file for these examples to include all the JavaScript HTML SWF files and not just the MXML source.
Peter
I get the same error as Lively & Company …
1046: Type was not found or was not a compile-time constant: FullScreenEvent.
can you tell me what the problem could be and what i should do to activate fullscreen
Alternatively, if you have a clue what you are doing and want to skip all the BS above, here is a much shorter version. You never have to use Application.application from within the main app mxml file btw, nor do you have to use the system manager in this instance. This will create the exact same results as the example above but with only 4 lines of code:
My apologies, I didn’t realize this blog stripped tags from posts, hopefully this one shows up right:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="{stage.addEventListener('fullScreen',function(e:Event):void{ debugText.text='width:' width ' height: ' height '\rDisplay State: ' stage.displayState; })}"> <mx:Text id="debugText" text="width: {width} height: {height '\r'}Display State: normal" width="200" height="60" textAlign="left" /> <mx:Button label="Toggle fullscreen" click="{stage.displayState=='fullScreen' ? stage.displayState='normal' : stage.displayState='fullScreen';}" /> </mx:Application>Justin,
Awesome work, thanks for the tip!
Peter
selva,
Which version (and build) of the Flex SDK are you using? I believe there was a problem with the Labs version of Flex Builder 3 Beta 1, but if you update to a newer nightly build everything should be A-OK.
Peter
Peter,
I tried to get source code from this page. Full screen does not work. I installed player gain. Found another example with no source code where full screen works. Can you please post the final source code?. I am kind of newbe. Thanks.
sh
shilpi,
Which version of the Flash Player are you using? (If you aren’t sure, you can check out this post and it should have an embedded SWF that will tell you the OS, Player Version, and whether or not its a debug version of Flash Player: “Debugging Flex applications with mm.cfg and flashlog.txt“.) And did you modify the HTML template and set the “allowFullScreen” property to “true” in both the JavaScript and Object/Embed tags?
I’ve updated the ZIP file (FullScreen_test.zip) with the MXML as well as the HTML/SWF/JavaScript. Can you try downloading the ZIP file again and trying the sample?
Peter
Peter,
I am very sorry that I did look at your comment when I checked for your reply. Noticed my name on top and stopped right there. Many thanks for replying right back.
I was able to build and run fine with this and after copying your code. My problem was that I did not have playerglobal.swc needed to run video. You may want to include that file in your source - I had trouble fnding that file!.
– shilpi
i need a code rhat can enable my myspace to be views in full screem
wgen visited, the code needs to be in style tags of some kind, css only works that i know of
will pay for it
Thanks a lot ;)
Hi, thanks for the great tutorial, but for a beginner like me does help much :(
I was wondering if you could help me out.
How can i add this full screen function to my website?
I only know how to work in flash, i don’t know flex.
So, how do i make a button in flash that calls this script?
This means a lot,
Cheers!
Hello,
I try to switch my application in fullscreen mode at the launch. I don’t want to have to push a button to switch to fullscreen mode…
BUT when a force Fullscreen in the applicationComplete Event i have the message : Fullscreen not allowed… And when i push the toggle fullscreen button it works….
Somebody have a solution?
Thank you very much for your contribution.
I might be incredibly stupid, but whenever I tried to add this code to my project, it says I can’t override a built in function. So I did a little investigating, and it turns out there’s a “toggleFullScreen” already for a Click event? I’m really confused. Thanks!
Adam,
I don’t see a “toggleFullScreen” method/property in the Flex 3 Language Reference. If you want to try posting some code, I can take a look.
Just remember that you may need to escape “<” characters as “<” and “>” characters as “>”, otherwise the blog may eat your code.
Peter
I cant see my post so ill post again
A funny fact.
If you write mysite.com/main it wont work.
If you write mysite.com/main.html it will work
I have no idea why this is so,
Im using IE7.
Phill
BloOdFiRe
I met the same problem, I even try to force toggle fullscreen button dispatch mouse_click event in the applicationComplete Event. this error still there. I have no idea. Any body could help us? Thanks very much!
Fullscreen not allowed…
Works like a charm, although i’d really like to supress the message telling the user that pushing escape will end the fullscreen. Any idea on how to accomplish that? thx.
Very good! It works fine… Except one very important thing :(
When I’m at the fullscreen mode, I can’t write anything in the flex application!
I can’t even select a textbox or textarea, etc…
Can you help me? If someone knows the answer, e-mail me: gugahawk@gmail.com
Thanks!
Oh no, sadly there is no error, it should act like that:
“Users cannot enter text in text input fields while in full-screen mode. All keyboard input and key-related ActionScript is disabled while in full-screen mode, with the exception of the keyboard shortcuts that take the viewer out of full-screen mode.”
Hello, your blog is the only one that works for me, everytime i get stuck you have a blog post about it. and i mean about 9 times so far.
My question is, I want to change the “Press esc button to exit full screen mode” to a different language. Is this possible without defining a locale? Or is it possible to create my own locale?
thanks so much for your contribution.
Alex
Alexander,
I don’t believe it is currently possible to localize that “Press Esc button…” message. Feel free to submit a bug report or enhancement request at http://www.adobe.com/go/wish?product=17
Peter
Cool,
Though my app switches to full screen
once navigated, my browser is getting crashed (Both FF and IE).
Navigation includes (change in ViewStack’s children)
Thanks
Raj,
What version of Flash Player do you currently have installed for each browser?
http://blog.flexexamples.com/about-you/
Peter
Many thanks Peterd for your tricks that help me more than books do.
However, i tryed the creation of full screen and encountered a problem.
I can no longer write any text in my application.
Could you help me ?
Thank you.
vincent lesieux,
Keyboard input is disabled when you are running in full screen mode.
Peter
Hi,
I have a flex application and i have loaded a swfloader(player) in a small panel. Now i want to make this small panel into full screen and i want to restore.
If i want to make a main application as a full screen mode, its working fine.But can anyone know the solution for the above pbm?
thanks
Dhinakaran.C
Thanks Peter for your wonderful efforts. Your code helped me too! I was playing around with it and realized that when I click on the full screen button on a cloned implementation on my app, the Full screen version always shows up on my primary monitor, irrespective of where the browser is. However the demo app you have on this blog loads shows the full screen on the correct monitor. Any ideas to where the problem might be? Thanks in advance!
Hey great blog! Thanks for the tips. I wonder how to provide the application with a full screen property so as soon as you go to the swf, so the page goes full screen automatically. I’m building a website in html/css but need the full screen functionality of flash 9 on one of the pages with a timer. Or some how include the full screen toggle with the Start Dream Creation button. Here is the code for what I’m working on and want this to be full screen. This code is a edit of another example on this website. I would link to it but I don’t want to F with your SEO.
Alex Grande,
I don’t believe you can force full-screen. I believe it needs to be initiated by a user event (mouse click, for example).
Peter
its give an error to me
Error #2152: Full screen mode is not allowed. ( which is SecurityError)
abhishek,
Did you edit the HTML container and set the
allowFullScreenattribute totrue?Peter
I have full-screen mode working but my Flex application, when loaded in an IE browser, does not seem to allow any user interaction once the Flex app is in full-screen mode. It’s almost as if something is blocking user interaction.
Anyone ever seen this?
I am running Flash 9,115,0. It’s the oddest thing. It works fine when running through straight Flash player (minus the IE browser, etc.).
Thanks.
Hi,
I am working on flex application with .net. I want to open a modal dialog box (asp.net page) on click of a button placed in the flex application. How can i achieve this?
Thanks in advance…
hello sir i am facing problem to create slide show in flex plz could you tell me the procedure plz sir i want script how to create slide show on flex
Thanks for sharing this, Peter.
One thing that is somewhat annoying is that if the Flex application contains a video anywhere in the application (in my case a FLVPlayback component) going into full screen mode only shows the video component, not the entire application. Commenting out the video component allows the whole application to be full screen.
Does anyone know how to allow a Flex application with video to show the whole application when in full screen mode?
After a little more Googling, I found the answer to my own question. I thought others might be interested, so I’m reposting it here:
Why does FLVPbaybak component take over the whole screen when the Flex application goes into full screen mode?
For the FLVPlayback Flash component this is the default. If you want to see the other elements then set it to false.
fullScreenTakeOver : Boolean
“When the stage enters full-screen mode, the FLVPlayback component is on top of all content and takes over the entire screen.”
Is it possible fullscreen mode in flex apllication?If it is yes plz suggest how to write the full screen mode application…
The code above got me started but this uses a getter/setter on fullScreen:Boolean to allow you to enter fullscreen mode with “fullScreen=true” and bind to the value of fullScreen, as I do below with the checkbox:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > <mx:initialize><![CDATA[ systemManager.stage.addEventListener( FullScreenEvent.FULL_SCREEN, function(event: FullScreenEvent): void { fullScreen = event.fullScreen; } ); ]]></mx:initialize> <mx:Script><![CDATA[ private var _fullScreen: Boolean; [Bindable] public function get fullScreen(): Boolean { return _fullScreen; } public function set fullScreen(isFull:Boolean):void { _fullScreen = isFull; stage.displayState = (isFull) ? StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL; } ]]></mx:Script> <mx:CheckBox id="fs" label="Full Screen" click="fullScreen=event.target.selected" selected="{fullScreen}" horizontalCenter="0" verticalCenter="0"/> </mx:Application>Peterd,
i saw you answered that the Keyboard events are disable in full screen mode,
can you tell why? is it going to be solved soon? test is the name of the game
in RIA…
Boaz
Hello,
I’m new on Flex but from what I read, the Full screen mode doesn’t allow text input nor switching tab. This is a show stopper for me. Is there a way of going around those restrictions ? Instead of Flex’s full screen mode, I could use a browser full screen but how to trigger a F11 keystroke on the browser from a Flex link ?
Happy Flex
Philippe
how to add fullscreen here:
<script type="text/javascript"> // <![CDATA[ var so = new SWFObject('MechanisM.swf', 'website', '100%', '100%', '10', '#000000'); so.useExpressInstall('swfobject/expressinstall.swf'); so.write('content'); // ]]> </script>MechanisM,
I’ve never tried SWFObject, but does something like this work?
<script type="text/javascript"> // <![CDATA[ var so = new SWFObject('MechanisM.swf', 'website', '100%', '100%', '10', '#000000'); so.addVariable("allowFullScreen", "true"); so.useExpressInstall('swfobject/expressinstall.swf'); so.write('content'); // ]]> </script>Peter
Thnxx Peterd!!!
Peter,
Is there any work being done to enable full functionality (e.g. text input) in the full screen mode? Without this capability, it’s not good for much more than a video player or statis charting application. Supposedly there is some security concern, but it needs to be up to the developer/client to decide (fullScreenInteractive = “true”).
很好,很强大
Great post Peter,
but I’m guessing at text input problem.
I totally got lost trying to find a work around..
any advice?
thank you,
andrea
Andrea,
Text input is currently not supported while a Flash/Flex application is in full screen mode in Flash Player.
Peter
“Text input is currently not supported while a Flash/Flex application is in full screen mode in Flash Player.”
And hopefully will never be. Consider a page that renders a full screen flex window showing a standard Windows log in screen. How many will think that something weird has happened to Windows once again and enter the login credentials into the malicious window?
Hey!
Is it possible for an AIR application to have two stages which go fullscreen on two monitors with different content? I would like a movie on full screen on my secondary display and controls on the other, both in fullscreen. This would really help me out, thanks!
Magz,
I’m not aware of any APIs that allow you to do that (but I’m certainly no AIR expert). Maybe try asking on a high-traffic list like FlexCoders and see if anybody has tried experimenting with AIR + full screen + dual monitors.
Sorry,
Peter
Very good work great thx for this great tutorial !!!
In AIR you can use the FULL_SCREEN_INTERACTIVE statement to go fullscreen with working text inputs. It could be nice to have this feature in Flex too. I undestand all the security issues bond with this function, but I can’t believe that there is not a workaround in order to let us developers design a fully functional fullscreen application and at the same time let users keep their security safe.
At the current conditions, fullscreen feature in Flex is nothing more than an oddity, good just for poorly interactive web sites…
If this problem can’t be solved, I think I’ll abandone the Flex platform very quickly :-(((
Adobe developers say that disabling text inputs when in fullscreen is a security feature: you cannot interact with a Flex application running fullscreen because a potential hostile could duplicate a login interface and stole your account, with a well-known phishing technique.
But did you noticed a funny thing? You can’t write directly into an input field in fullscreen mode, yes, but you can always <b>PASTE TEXT INTO IT</b> (right-click on the field, and then select “paste” from the popup menu) and thus completely bypass the clever and strong security “fullscreen feature”. No need for hacks, patches, or whatever. <b>Just copy a text from notepad and paste it into the “disabled” input field of your fullscreen Flex application</b>: oh my god, the disabled input field works again! Press your submit button, and go.
WOW!!! :-\
Dear Adobe developers, please, remove this silly limitation NOW, and try to deal with security issues in better ways. <b>Security through obscurity is nothing but a failure</b>, if you are a real software developer.
There are peoples here, who try to produce useful interactive applications with Flex (in my case, applications to be used for scientific research in oncology and molecular biology) and who really would like to take advantage from a fully working fullscreen feature…
And please, don’t suggest to switch to AIR, this is not a valid alternative if you’re developing an application to be distributed as a web service.
Hi,
I have a white screen when I insert “allowFullScreen”, “true”. The problem occur exactly if I insert this line. Any idea why, apparently, javascript don’t like this…
I use as well Cairngorm, locales, and external module but I don’t think it’s related ?
By the way I can run your example and I have the last player version.
Thanks
Simon
Via Flex 3, & Flash Player 10, editing the html template file produces a blank screen in Firefox 3. Anyone else having this issue? Thanks in advance!
Pessoal eu não concegui realizar o teste ….
alguem poderia me ajudar ?
Eu clico no botão mas não acontece nada, eu ja abilitei o “allowFullScreen”, “true”
Teria como algeum me passar um video ou um projeto completo de exemplo?
Obrigado!
I click on the button but nothing happens, I already enable the “allowFullScreen”, “true”
Algeum can I pass a video or complete a project as an example?
Thank you!
Magz.. regarding your query.. I think WebOrb can potentially do this in a couple of ways.. one of which is to use shared objects to pass information between the 2 different browser instances or potentially stages, each of which could be hosting different content but effectively be communicating to be ‘one application..
What if you have another swf inside of your flex app using fullscreen? It is a video player and I want to make the video player go fullscreen on click, but the whole flex app goes fullscreen. How do I capture that and tell flex to make that inside player be the thing that is FS?
Thanks for this great article. While trying to enable “automatic full screen” I encountered several security errors and found some solutions:
- From inside a browsers window you just can’t automatically switch to fullscreen; even when you dispatch a clickevent. It can only be triggered by a REAL clickevent.
- When compiled and exported to a projector (from within flashplayer) you actually CAN automate fullscreen and have textinputs etc. enabled (this last thing I did not test).
:)
Debugging Fullscreen applications in Flex Builder:
http://devote.your.life.auricom.com/?p=65
thank you for this great function;
i haven’t had time to read your post through; but i’m sure it’s very useful.
the code works; and was easy to add to a project.
thanks again and
please keep it up :P
@tyler: i think you can just stretch the video swf to the full screen size by making the flex app full screen and then directly after that; changing the video swf’s height and width properties to the same as full size of the screen / stage.
hth
@tyler I had this problem so what I did was create two Video containers, one of them sitting above everything else within a Box container with a black background and its visibility bound to a Boolean that represented the Fullscreen mode. When the video is playing you swap the NetStream from one Video container to the other. The result is a seamless bit of fullscreen video without the rest of the SWF content.
Hi!
i need to use in my FullScreen Application the ESCAPE key for navigation…
My cuestion is:
Could i disable o cancel the FullScreenEvent and use the KeyboardEvent.KEY_DOWN ? i need an only fullScreen App….
this.addEventListener(KeyboardEvent.KEY_DOWN, keyDownEventHandler);
}
private function keyDownEventHandler(event:KeyboardEvent):void {
switch(event.keyCode)
{
case Keyboard.ESCAPE: cancelAction();break;//never happends
case Keyboard.ENTER: goAction();break;
}
}
Thanks!
keyboard disabled in full screen mode…
sam
Excellent site.
I went through the entire tutorial just to find out that my Flex application at Full Screen will not allow inputs. This is still the case after 1.5 years time, eh? Ouch.
I guess I’ll read all the comments before actually trying the code next time. A blurb at the beginning of the article could’ve saved me 30 mins though…
For more on why the Adobe crew decided to not allow user-input while in Full Screen mode:
http://livedocs.adobe.com/flex/3/html/help.html?content=05B_Security_06.html
Seems silly, but it’s the fastest solution to their security issue with full-screen.
Beginning code workaround… now.
Hi! Theres any way to modify the wrapper file generated from Adobe Flex Builder? I hate to modify all the time the Full screen options. Thanks in advance
I mean, theres a posibility to change automatically the content of the wrapper file on Flex IDE to make this fullscreen options available without modify the wrapper file by hand, beacose when you change the source the wrapper change too. Thanks and sorry for double post
Sun
There is no place in the IDE in order to change or add params but you can go to the root folder of your project, and go into html-template and add these parameters in index.template.html and save the file.
This is a template html file, flex builder uses, in order to generate html wrapper file.
-Pankaj
I am very thank full and for using this example, but i want to know that Videodisplay control is capable of full screen, or canvas or any other container except application.
It would be nice if any body send me the answer.