SecurityError: Error #2152: Full screen mode is not allowed. - actionscript-3

I have one flash player , which have full-screen functionality . which is not working in FF and MAC Chrome . and throws an error as below.
SecurityError: Error #2152: Full screen mode is not allowed.
at flash.display::Stage/set displayState()
at com.IQMediaCorp.core::IQMediaCorpPlayer/ToggleFullScreen()
I have googled about the issue and already verified some points below
my player have allowfullscreen = true in html object / encode
element.
the methid ToggleFullScreen is an mouse click event
below is code for ToggleFullScreen method
public function ToggleFullScreen(e:MouseEvent)
{
if (stage.displayState == StageDisplayState.FULL_SCREEN_INTERACTIVE)
{
bKnob.alpha=0;
bigScreen=true;
stage.displayState=StageDisplayState.NORMAL;
}
else
{
bigScreen=false;
stage.displayState=StageDisplayState.FULL_SCREEN_INTERACTIVE;
bKnob.alpha=0;
}
}
i don't get the reason why it is not working. can anybody help??
Thanks

Yes the reason this is happening is you cannot have StageDisplayState.FULL_SCREEN_INTERACTIVE in Flash less than version 11.3
Try StageDisplayState.FULL_SCREEN instead!
So check which version of flash you are building for here is an exerpt from the Adobe docs on displayState
Runtime Versions: Flash Player 11.3, AIR 1.0, Flash Lite 4
Specifies that the Stage is in full-screen mode with keyboard interactivity enabled. As of Flash Player 11.3, this capability is supported in both AIR applications and browser-based applications.

Related

Actionscript How to debug using getStackTrace() in any web browser, not in flash player without the browser

How to debug using getStackTrace() in any web browser, not in flash player without the browser
trace2(err.getStackTrace());
I'am trying to get the error stackTrace in my broswer, but it returns NULL, according to the documentation the stack trace is only displayed in the flash player debugger, but I need to see it in the browser, cause many data is passed through web server, is there any browsers or addons who can help me to see the stackTrace?
You have to use the Flash Player content debugger plugin, with that you'll be also able to use the debugger for the Flash movies loaded in the browser.

as3 Video not displayed on PC in debug mode

I am developing an app in as3+AIR for iPad with Flashdevelop.
I stream a flv with StageVideo and everything is working fine deployed on iPad.
But on the PC in Flashdevelop Debug mode no video is shown, although it gets played (NET_STATUS events are dispatched).
Any idea whats happening?
According to Adobe's Flash Roadmap, StageVideo won't be supported on PCs until 2013.
Try adding some code which checks for StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY:
function onStageVideoState(e:StageVideoAvailabilityEvent):void
{
var available:Boolean = (e.availability == StageVideoAvailability.AVAILABLE);
trace("Got StageVideo?", available);
}
stage.addEventListener(StageVideoAvailabilityEvent.STAGE_VIDEO_AVAILABILITY, onStageVideoState);
When StageVideo is not available, you'll have to use a regular Video object as a fallback.

SWFObject embedded Flash fullscreen doesn't work on PC

I created a fullscreen flash app on
http://dominggus.nl/school/afstuderen/expo/
I used the SWFObject generator to create the embedding code.
Furthermore, I need to put the screen.width/screen.height (with JavaScript) as flashVars to the SWF...
This all works perfectly on MAC on Chrome/FF but, on windows it only works in IE...chrome and Firefox refuse to go fullscreen...
how can that be?
edit: I already tried static/dynamic publishing with SWFObject, same results
(see http://dominggus.nl/school/afstuderen/expo/index2.html for dynamic)
Ah looks like you're running into a flash run-time error but not seeing it in Chrome or FF cause of no Debug player installed, this is easy for FF just install the netscape compatible debug player to see the error (for Chrome the install is more complicated, due to it managing Flash player updates internally).
In FF I get this error:
SecurityError: Error #2152: Full screen mode is not allowed.
at flash.display::Stage/set displayState()
at nl.dominggus.infographic.ui::NoFullScreenPage/startButtonClickHandler()[/Users/dominggus/Documents/dpdk/eclipse_workspace/cmd_afstuderen_infographic/src/as/nl/dominggus/infographic/ui/NoFullScreenPage.as:54]
I believe this means the allowFullscreen parameter for the plugin isn't being set correctly.
Verify Flash player version here (bottom of page shows debug Yes/No):
http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html
Get the appropriate Debug player for a given platform:
http://www.adobe.com/support/flashplayer/downloads.html
Edit pasted from the docs
FULL_SCREEN_INTERACTIVE Constant
public static const FULL_SCREEN_INTERACTIVE:String = "fullScreenInteractive"
Language Version: ActionScript 3.0
Runtime Versions: Flash Player 11.3, AIR 1.0, Flash Lite 4

Flash exit fullscreen mode on PrintJob

I am using a flash image viewer developed with actionscript 2.0 and used only with IE. It uses flash PrintJob to print images.
var printJob:PrintJob = new PrintJob();
printJob.start()
printJob.addPage(printMc)
printJob.send();
delete printJob;
But when PrintJob is invoked at fullscreen mode, print dialog appears and flash player exits fullscreen mode. Is this a security limitation in Flash ? or Is there any workaround to stop exiting fullscreen mode?
Tested environment
Browser: IE9
OS : Windows 7 64 bit
Flash Player: 11.1.102.63
I would imagine that it's down to the Operating System rather than a unique Flash issue. You can't keep a window in fullscreen mode if it's not the active window; and when you open the Print dialog, that becomes the active window - thus bumping your Flash out of fullscreen mode.
No workarounds that I can think of, because it's not Flash that's controlling this - it's the OS.

Fullscreen mode loaded when opening Flash Player

Is it possible to make a flash player go full screen (not in browser)?
Would there be any bug / error on different version of Flash player?
HI!
stage.displayMode = StageDisplayState.FULL_SCREEN_INTERACTIVE;
Available only in Adobe AIR.
It allows you to listen to keyboard events (meaning you can also type inside text boxes etc..)
stage.displayMode = StageDisplayState.FULL_SCREEN;
Available in any AS3 based flash file (starting from flash 9)
There is no issue with using it, except you cannot use the keybard.
From my experience with fullscreen mode's in flash the main thing to bear in mind is to make your application have liquid layouts which re-act to the Event.RESIZE. Then when you listen for that event re-lay out your application to the new ( fullscreen ) width and height.
To do this you would change the stage.displayMode to StageDisplayState.FULL_SCREEN
In Flash player it's Ctrl-F, as menu suggests, so it's certainly possible. Have you tried stage.displayMode = StageDisplayState.FULL_SCREEN_INTERACTIVE? StageDisplayState doc says it's here from version 9.0.28.0.