# Screen dimensions and Preloader Problems

**URL:** https://forum.kirupa.com/t/screen-dimensions-and-preloader-problems/184686
**Category:** flash
**Created:** [April 6, 2006, 8:23pm UTC](https://forum.kirupa.com/t/screen-dimensions-and-preloader-problems/184686 "2006-04-06T20:23:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ice987](https://avatars.discourse-cdn.com/v4/letter/i/779978/32.png) [@ice987](https://forum.kirupa.com/u/ice987)
#### Post date: [April 6, 2006, 8:23pm UTC](https://forum.kirupa.com/t/screen-dimensions-and-preloader-problems/184686/1 "2006-04-06T20:23:52Z")

</div>

Hello

I’m trying to achieve the simple task of loading a flash clip (dimensions 480\*720) and placing a simple preloader in the middle of the screen.

I can’t seem to get the dimensions right and the clip seems to be pushed off rhe canvas to the right. I have coloured the canvas blue to show this.The Preloader stays in the top left of the screen.

Can you correct my script?

//do I need this to stretch out the movie so I can place loader in center of screen???  
var clip=createEmptyMovieClip(“canvas\_mc”,0)  
canvas\_mc.beginFill(0x0000FF,100);  
canvas\_mc.moveTo(0,0);  
canvas\_mc.lineTo(480,0);  
canvas\_mc.lineTo(480,720);  
canvas\_mc.lineTo(0,720);  
canvas\_mc.endFill();

var clip=createEmptyMovieClip(“clipHolder\_mc”,2)

var clipLoader:MovieClipLoader = new MovieClipLoader();  
var clipLoadHandler:Object = new Object();  
clipLoader.addListener(clipLoadHandler);

//create loading square  
this.createEmptyMovieClip(“sq\_mc”,1);  
sq\_mc.beginFill(0xff0000,100);  
sq\_mc.moveTo(0,0);  
sq\_mc.lineTo(100,0);  
sq\_mc.lineTo(100,20);  
sq\_mc.lineTo(0,20);  
sq\_mc.endFill();

sq\_mc.moveTo(canvas\_mc.\_width/2,canvas\_mc.height/2);

clipLoader.loadClip("./flashSplash.swf",clipHolder\_mc);

clipLoadHandler.onLoadProgress=function(\_mc:MovieClip, loaded:Number){

sq\_mc.\_xscale=(loaded/100000)\*100

}
