# Center Stage FLV Load Delay

**URL:** <https://forum.kirupa.com/t/center-stage-flv-load-delay/247728>\
**Category:** flash\
**Created:** [December 28, 2007, 7:35pm UTC](https://forum.kirupa.com/t/center-stage-flv-load-delay/247728 "2007-12-28T19:35:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snozbunny](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@snozbunny](https://forum.kirupa.com/u/snozbunny)\
**Post date:** [December 28, 2007, 7:35pm UTC](https://forum.kirupa.com/t/center-stage-flv-load-delay/247728/1 "2007-12-28T19:35:29Z")

</div>

This should be pretty easy. I set up a ‘container’ MovieClip to move on center stage in a full browser flash file. The program works but the only hick-up is that after the flv loads in ‘loadvideo’ I have no way to call the ‘resizeDisplay’ function so it shows up off center. Any suggestions?

```php

package {
    import flash.display.Sprite;
    import flash.display.Stage;
    import flash.display.StageScaleMode;
    import flash.display.StageAlign;
    import flash.display.MovieClip;
    import flash.events.Event;
    import components.*;
    import flash.events.MouseEvent;
    import flash.events.NetStatusEvent;

    public class videoplayer extends Sprite {
        private var swfStage:Stage = stage;
        private var _loadVideo=new MovieClip;
        private var _imageLoader:ImageLoader;
        private var _containerCC:MovieClip;
        private var _testing:MovieClip;
        private var _container=new MovieClip;

        public function videoplayer():void {
            swfStage.scaleMode = StageScaleMode.NO_SCALE;
            swfStage.align = StageAlign.TOP_LEFT;
            swfStage.addEventListener(Event.RESIZE, resizeDisplay);
            
            _container = new MovieClip;
            addChild(_container);

            _loadVideo=new loadvideo("demoreel.flv");
            _container.addChild(_loadVideo);

            resizeDisplay();
        }

        private function resizeDisplay(event:Event = null):void {
            var swfWidth:int = swfStage.stageWidth;
            var swfHeight:int = swfStage.stageHeight;
            _container.x = Math.round((swfWidth/2)-(_container.width/2));
            _container.y = Math.round((swfHeight/2)-(_container.height/2));
        }
    }
}

```
