Preloader/Full Screen Issue
This is the page that Im working on: www.houseofopama.com/temp.html . I am loading opama.swf into preloader.swf and using a code so that I can have a full screen background image. However, my background image covers my preloader while its loading. & I would like my loaded movie to be centered and scaled. Can someone help me with this???
Here's my code:
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("opama.swf"));
stage.align = StageAlign.BOTTOM;
function loop(e:ProgressEvent):void
{
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}
function done(e:Event):void
{
removeChildAt(0);
percent = null;
addChild(l);
}
var loader:Loader = new Loader();
var mc:MovieClip = new MovieClip();
stage.scaleMode = StageScaleMode.NO_SCALE
stage.align = StageAlign.TOP_LEFT;
loader.load(new URLRequest("http://www.houseofopama.com/jpeg-tile.jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, c);
function c(event:Event):void {
mc.addChild(loader);
this.addChild(mc);
mc.width = stage.stageWidth
mc.height = stage.stageHeight
stage.addEventListener(Event.RESIZE, r);
}
function r(event:Event):void {
mc.width = stage.stageWidth
mc.height = stage.stageHeight
mc.x = 0;
mc.y = 0;
}
***Kglad, I know u probably know what to do, if u see this***