MovieClip size once Jpeg loaded

Hi,

I am creating an empty movieclip and loading a jpeg into it. The mc does not seem to resize to account for the jpeg’s size, also the parent mc (thisClip) which is also created dynamically (with attachmovie), is set at 500 - i have no idea why:

thisClip.createEmptyMovieClip(“theJpeg”, 2);
thisClip.theJpeg.loadMovie(url);
thisClip.theJpeg.onEnterFrame = function(){
if(this.getBytesLoaded() >= this.getBytesTotal())
{
delete this.onEnterFrame;
trace(this._width);
}
}

any ideas?

thanks in advance

ash