# Loadmovie

**URL:** https://forum.kirupa.com/t/loadmovie/56336
**Category:** Uncategorized
**Created:** [July 2, 2004, 7:55pm UTC](https://forum.kirupa.com/t/loadmovie/56336 "2004-07-02T19:55:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fatman2000](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@fatman2000](https://forum.kirupa.com/u/fatman2000)
#### Post date: [July 2, 2004, 7:55pm UTC](https://forum.kirupa.com/t/loadmovie/56336/1 "2004-07-02T19:55:59Z")

</div>

Hi there …

If anybody knows ? … have the following code which works perfectly on my home computer but once uploaded does not work at all …

[www.feltonstreet.co.uk/tania/resizeborder.swf](http://www.feltonstreet.co.uk/tania/resizeborder.swf)

* * *

spacing = 10;  
containerMC.alpha = 0;

MovieClip.prototype.loadPic = function(pic){  
this.loadMovie(pic);  
onEnterFrame = function(){  
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();  
if (t != 0 && Math.round(l/t) == 1){  
var w = containerMC.\_width + spacing, h = containerMC.\_height + spacing;  
this.border.resizeMe(w, h);  
delete this.onEnterFrame;

}  
}  
};  
MovieClip.prototype.resizeMe = function(w, h){  
var speed = 3;  
this.onEnterFrame = function(){  
this.\_width += (w - this.\_width)/speed;  
this.\_height += (h - this.\_height)/speed;  
if( Math.abs(this.\_width-w)\<1){  
this.\_width = w;  
this.\_height = h;  
containerMC.\_x = this.\_x - this.\_width/2 + spacing/2;  
containerMC.\_y = this.\_y - this.\_height/2 + spacing/2;  
containerMC.\_alpha = 100;  
delete this.onEnterFrame;  
}  
}  
};
