I have an flv loaded externally. I’ve added it to a movieclip and want it to fill the stage as my background and scale proportionally. The proportions work fine and the movie seems to scale fine. My problem is the movie doesn’t start right away. It shows blank until I resize the browser then it shows up fine. Need help. Here is the code:
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);
function setBackground() {
bg_mc.x = 0;
bg_mc.y = 0;
bg_mc.width = stage.stageWidth;
bg_mc.height = stage.stageHeight;
bg_mc.scaleX <= bg_mc.scaleY ? (bg_mc.scaleX = bg_mc.scaleY) : (bg_mc.scaleY = bg_mc.scaleX);
}
setBackground();
function resizeHandler(event:Event):void {
setBackground();
}