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.