Hello everyone,
I’m having the weirdest problem. I have a fullscreen function and it works great except when I try to make the current video playing the same size as my screen. Oddly enough it reports that the swfStage.width is 1280 but the videoScreen.width is 852?
How does…
videoScreen.width = swfStage.width COLOR=Red[/COLOR];
end up as [COLOR=Red]852px[/COLOR]?
private function fullScreen(event:Event = null):void
{
if (swfStage.displayState == StageDisplayState.NORMAL) {
swfStage.displayState = StageDisplayState.FULL_SCREEN;
if (videoScreen.height > swfStage.height && (swfStage.width - videoScreen.width) < (swfStage.height - videoScreen.height)) {
testbox.output("smaller height");
} else if (videoScreen.width > swfStage.width && (swfStage.height - videoScreen.height) < (swfStage.width - videoScreen.width)) {
testbox.output("smaller width");
} else if (videoScreen.height < swfStage.height && (videoScreen.height - swfStage.height) < (videoScreen.width - swfStage.width)) {
videoScreen.height = swfStage.height;
} else if (videoScreen.width < swfStage.width && (videoScreen.width - swfStage.width) < (videoScreen.height - swfStage.height)) {
videoScreen.width = swfStage.width;
videoScreen.height = swfStage.height;
}
centerstage.resizeDisplay();
} else {
videoScreen.width = flvXML.settings.width;
videoScreen.height = flvXML.settings.height;
swfStage.displayState = StageDisplayState.NORMAL;
}
playVideo();
}