Load image position problem

Hi all!

I’m trying to load an image with the following code but sometimes the image wont end up in the right place. Can someone understand why?

var exampleHolder = exampleLoader_mc.attachMovie(“exampleLoaderHolder_mc”,“example”,1)
exampleHolder.loadMovie(_root.publicExampleToLoad)
this.onEnterFrame = function()
{
filesize = exampleHolder.getBytesTotal();
loaded = exampleHolder.getBytesLoaded();
if(loaded == filesize)
{
var imgHeight = exampleLoader_mc._height
var imgWidth = exampleLoader_mc._width
exampleHolder._x = (950/2)-(imgWidth/2)
exampleHolder._y = (600/2)-(imgHeight/2)
delete this.onEnterFrame
play()
}
}

Have a great day!