FLV fullscreen problem
cleverbits May 21, 2010 12:07 AMI'm loading a SWF into a projector, the projector opens fullscreen using the fullscreen fs command, unfortunatley any video in the SWF's being loaded into the projector scale to fullscreen as well, I can't change the code in the clips being loaded so I have tried to implement the code from this thread http://forums.adobe.com/thread/635754 without success, follows is my code and source files can be downloaded from http://www.cleverbits.com/video.zip can anyone see where I'm going wrong?
import fl.video.FLVPlayback;
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.Event;
import flash.events.ProgressEvent;
import flash.system.fscommand;
fscommand("showmenu","false");
fscommand("trapallkeys","true");
fscommand("fullscreen", "true");
fscommand("allowscale", "false");
function startLoad() {
var mLoader:Loader = new Loader();
var mRequest:URLRequest = new URLRequest("video.swf");
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadCompleteF );
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
mLoader.load(mRequest);
}
function onCompleteHandler(loadEvent:Event) {
addChild(loadEvent.currentTarget.content);
}
function onProgressHandler(mProgress:ProgressEvent) {
var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
trace(percent);
}
setTimeout(call_flvTakeOverDisableF,500);
function call_flvTakeOverDisableF() {
flvTakeOverDisableF(MovieClip(mLoader.content));
}
function loadCompleteF(e:Event) {
flvTakeOverDisableF(MovieClip(mLoader.content));
}
function flvTakeOverDisableF(mc:MovieClip) {
for (var i:uint=0; i<mc.numChildren; i++) {
if (mc.getChildAt(i) is FLVPlayback) {
FLVPlayback(mc.getChildAt(i)).fullScreenTakeOver = false;
break;
} else if (mc.getChildAt(i) is MovieClip) {
flvTakeOverDisableF(MovieClip(mc.getChildAt(i)));
}
}
}
startLoad();
stop();