Copy link to clipboard
Copied
I have a game with a button that changes the status of the screen to "Full Screen"
Everything works fine, I can enter a state of "full screen" and go back many times, also when there is background video, I can enter a state of "full screen" and see the big video.
But there is a problem, after I complete Treatise with video in and out. Since then, every time I go into a state of "full screen", whether video background or not, the entire screen appears black.
Clearly the fact that the video was in "full screen" status, is the cause
How can I Prevent it? specially the target is to see also the video on full screen status?
Thanks all!
Copy link to clipboard
Copied
if you're using an flvplayback component, assign its fullScreenTakeOver to false.
Copy link to clipboard
Copied
Thanks.
Yes, I've done it, but I did not see it helped. Maybe another idea?
Copy link to clipboard
Copied
what's the name of your flvplayback component?
Copy link to clipboard
Copied
var flvPlayback:FLVPlayback;
flvPlayback = new FLVPlayback();
Copy link to clipboard
Copied
good.
now, copy and paste that code (along with the takeover code) in context so i see if that code is within a function body and if you applied the takeover code correctly.
Copy link to clipboard
Copied
of course there is a lot of code, but it does not fit here:
function thisAddedToStage(e:Event)
{
this.removeEventListener(Event.ADDED_TO_STAGE, thisAddedToStage);
flvPlayback.load(swfFolderPath + "/" + "dasi.flv");
flvPlayback.fullScreenTakeOver = false;
}
FullScreenBTN.addEventListener(MouseEvent.CLICK, fullScreenBTNClick);
function fullScreenBTNClick(e:Event)
{
stage.scaleMode = StageScaleMode.NO_SCALE;
var screenRectangle:Rectangle = new Rectangle();
screenRectangle.x = 0;
screenRectangle.y = 0;
screenRectangle.width = stage.stageWidth;
screenRectangle.height = stage.stageHeight;
stage.fullScreenSourceRect = screenRectangle;
stage.quality = StageQuality.BEST;
stage.displayState = StageDisplayState.FULL_SCREEN;
flvPlayback.fullScreenTakeOver = false;
}
ExitFullScreenBTN.addEventListener(MouseEvent.CLICK, exitFullScreenBTNClick);
function exitFullScreenBTNClick(e:Event)
{
stage.displayState = StageDisplayState.NORMAL;
flvPlayback.fullScreenTakeOver = false;
}
Copy link to clipboard
Copied
there's nothing wrong with that code. so, you must be doing something else to cause a problem.
what do you mean by, "after I complete Treatise with video in and out"?
Copy link to clipboard
Copied
I'm sorry, it's Gogle Translate...
I wanted to say that after the video begin to play in NORMAL state, I click on the fullScreenButton, then the state becomes FULL_SCREEN state and the video looks good. then I click on the ESC button on the Keyboard, which make the status back to NORMAL. from then on, if I click again on the fullScreenButton, the state becomes FULL_SCREEN, but the screen is black! clicking on the ESC button again, return it to NORMAL state and all nice, but small
Thanks again!
Copy link to clipboard
Copied
there's nothing in the code you've shown that would cause that.
in fact, create a new fla. add the code your showed, the two buttons and your flvPlayback instance. and test.
that should confirm there's no problem with the code you showed. then start adding feautures of your current setup to the new fla until you either trigger the problem (allowing your to pinpoint the issue) or recreate a new fla that doesn't have the problem.
Copy link to clipboard
Copied
It seems an excellent idea! I'll do it.
File is a bit complicated, so it will take some time. I'll Keep you posted
Thank you a lot!
Copy link to clipboard
Copied
Well, After many attempts the matter resolved as follows:
after loading the movie, I wrote this:
flvPlayback = new FLVPlayback();
flvPlayback.load(xmlloader.videoName);
flvPlayback.fullScreenTakeOver = false;
While after I added it to its visual parent (type FLVPlayback), I wrote this:
movieFLV.addChild(flvPlayback);
movieFLV.fullScreenTakeOver = false;
I do not know why, but one without the other does not work.
Thanks kglad! and If you have an explanation I would be happy to hear it
Thanks again,
Copy link to clipboard
Copied
i've never seen anything like this:
movieFLV.addChild(flvPlayback);
where movieFLV is an flvplayback component.
what purpose is served by doing that? did you do that as an attempt to solve the black screen problem, only?
Copy link to clipboard
Copied
I tried it again: If the video container is a movie clip of different kind, the screen appears black. When I go back to the state when the video container is a FLVPlayback, everything works great, as I wrote up
Copy link to clipboard
Copied
interesting.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now