Recently I have tried to convert the flash site to standalone projector with full-screen but the video using FLVPlayback will always take over the entire screen.
Fortunately there is a property called “fullScreenTakeOver” which will prevent FLVPlayback to take over the entire screen:
1 2 3 4 5 | stage.scaleMode = StageScaleMode.NO_SCALE; stage.displayState = StageDisplayState.FULL_SCREEN; myFLVPlayback.fullScreenTakeOver = false; myFLVPlayback.source = "video.flv"; |
But wait! Although the video won’t take over the screen, it will show all screen in black and cause some internal error in debug player when unload the video section movie clip…
After some Google-ing, I’ve found out that you need to set this property before FLVPlayback is rendered on the stage, here is how it will work:
1 2 3 4 5 | stage.addEventListener(Event.ADDED, onAdded); private function onAdded(e:Event):void { if (e.target is FLVPlayback) e.target.fullScreenTakeOver = false; } |
6 users commented in " FLVPlayback Takes Over When Set to Full Screen "
Follow-up comment rss or Leave a Trackbackthank you, you are the f**king man!!!
thanks mate 1000x. been looking for this for days!
Thanks so much! I’ve been trying to find the solution to this for weeks!!
You rock!
Ed,
Thank you so much for sharing this. You seriously saved my butt with this post. Please take the rest of the week off.
Hi, I copy and paste the code
stage.addEventListener(Event.ADDED, onAdded);
private function onAdded(e:Event):void {
if (e.target is FLVPlayback) e.target.fullScreenTakeOver = false;
}
and run my movie I get the error
‘1013: The private attribute may be used only on class property definitions.’
Please help.
If you paste the code into timeline frame, just need to remove “private” in front of function as it is for class only.
Leave A Reply