# Resizing Movieclip

**URL:** https://forum.kirupa.com/t/resizing-movieclip/69177
**Category:** flash
**Created:** [November 2, 2004, 2:43am UTC](https://forum.kirupa.com/t/resizing-movieclip/69177 "2004-11-02T02:43:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bjory](https://avatars.discourse-cdn.com/v4/letter/b/5e9695/32.png) [@bjory](https://forum.kirupa.com/u/bjory)
#### Post date: [November 2, 2004, 2:43am UTC](https://forum.kirupa.com/t/resizing-movieclip/69177/1 "2004-11-02T02:43:37Z")

</div>

I have a buttonMC which i created in the library and the swf connects to a database and depending on the database, it will display the number of buttonMCs on the stage one on top of another. The buttonMC itself has a dynamic text and a rect to hold the jpeg thumbnail externally as well.

What I did is to use the buttonMC on the library which has a dynamic  
text on top and a rect MC called thumbHolder to hold the thumbnail.  
And I created another rect on top of the thumbHolder called thumbNail and  
i delete the shape so that it is an emptyMC.

I use this function to resize any jpeg loaded in the thumbNail MC:

CheckLoad = function()  
{  
if (this.thumbNail.\_width \> 0 && this.thumbNail.getBytesLoaded() \>=  
this.thumbHolder.getBytesTotal())  
{  
this.thumbNail.\_width = 65;  
this.thumbNail.\_height = 49;  
delete this.onEnterFrame;  
}  
}

And I used it as follows:  
picFile = eval(“recData.Image” + i);  
\_root[“menuBtn” + i].thumbHolder.loadMovie(picFile);  
\_root[“menuBtn” + i].thumbHolder.onEnterFrame = checkload;

It doesn’t work thou.

I’m not sure how to create empty movieclips inside a button which  
gonna duplicate depending on the database, so I had to manually create  
it inside the buttonMC and delete the shape.
