I doing a list of dynamic buttons and on the button has a thumbnail(jpg).
I used the following codes to make sure the jpeg are resized according to the size I want.
CheckLoad = function()
{
if (this.thumbNail._width > 0 && this.thumbNail.getBytesLoaded() >= this.thumbHolder.getBytesTotal())
{
this.thumbNail._width = 65;
this.thumbNail._height = 49;
delete this.onEnterFrame;
}
}
GenerateMenu = function()
{
for (var i = startBtn; i < endBtn; i++)
{
_root.attachMovie(“menuBtn”, “menuBtn” + i, depth);
_root[“menuBtn” + i]._x = 644.5;
_root[“menuBtn” + i]._y = 161.1 + setHeight * _root[“menuBtn” + i]._height;
_root[“menuBtn” + i].btnName.text = eval(“recData.Name” + i);
_root[“menuBtn” + i].exerciseID = eval(“recData.ExID” + i);
picFile = “something.jpg”
_root[“menuBtn” + i].thumbHolder.loadMovie(picFile);
_root[“menuBtn” + i].thumbHolder.onEnterFrame = checkload;
}
}
It doesn’t work. The thumbnail does not show any pictures. What I do is I do an empty MC (thumbNail) and load the jpeg into the MC. It doesn’t work.
Can someone have a look on it?
Another question is that I have loaded a swf movie into a MC call movieHolder. I put the movieHolder on the stage. Apparently, the swf movie does not take the size of the movieHolder. How can I make the swf movie take the size of the movieHolder?
I use loadMovie(“something.swf” , “movieHolder”);