# A strange size issue in my code

**URL:** https://forum.kirupa.com/t/a-strange-size-issue-in-my-code/178010
**Category:** Uncategorized
**Created:** [February 7, 2006, 3:29am UTC](https://forum.kirupa.com/t/a-strange-size-issue-in-my-code/178010 "2006-02-07T03:29:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ozymandias](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ozymandias/32/1997_2.png) [@Ozymandias](https://forum.kirupa.com/u/Ozymandias)
#### Post date: [February 7, 2006, 3:29am UTC](https://forum.kirupa.com/t/a-strange-size-issue-in-my-code/178010/1 "2006-02-07T03:29:02Z")

</div>

I can’t seem to locate the problem. I declare the width of my picture to be 100 but it seems to end up 121 for no reason I can see. It’s driving me crazy. My mask is width 100 and the pictures are definetly not that size. Can someone see if I have a code problem I’m not seeing? :

function thumbnails\_fn(k, total) {  
thumbnail\_mc.createEmptyMovieClip(“t”+k, thumbnail\_mc.getNextHighestDepth());  
tlistener = new Object();  
tlistener.onLoadInit = function(target\_mc) {  
oldwidth = target\_mc.\_width;  
target\_mc.\_width = 100; \<----------------------------Pretty clear.  
target\_mc.\_height = Math.round((target\_mc.\_width/oldwidth)\*target\_mc.\_height);  
target\_mc.\_y = oldy;  
oldy = target\_mc.\_y+target\_mc.\_height+2;  
target\_mc.pictureValue = k;  
bg\_mc.\_height = thumbnail\_mc.\_height+2;  
bg\_mc.\_width = thumbnail\_mc.\_width+3;  
target\_mc.onRelease = function() {  
if (target\_mc.\_width == 300) {  
this.shrinkimage(target\_mc, total);  
} else {  
this.expandimage(target\_mc, total);  
}  
};  
target\_mc.onRollOver = function() {  
this.\_alpha = 75;  
};  
target\_mc.onRollOut = function() {  
this.\_alpha = 100;  
};  
};  
image\_mcl = new MovieClipLoader();  
image\_mcl.addListener(tlistener);  
image\_mcl.loadClip(thumbnails[k], “thumbnail\_mc.t”+k);  
}
