benihana
05-10-2004, 09:50 AM
im using actionscript to read a number from a text file, then loop through and duplicate, position and size that number of movieclips, and load a jpg into each. the jpgs are named 1,2,3 etc.
the positioning etc all works, but when i try to add an onRollOver action to each mc, nothing happens. if i create the movieclips and then NOT load the jpegs in, the onRollOver action works fine.
its extremely frustarting that i can target the movieclips for everything except the onRollOver. any ideas? thanks
code:
_root["thumb_" + i + "_mc"].loadMovie ("assets/images_flash/" + i + ".jpg");
_root["thumb_" + i + "_mc"]._x = (i * 43) - 30;
_root["thumb_" + i + "_mc"]._y = 160;
_root["thumb_" + i + "_mc"]._width = 30;
_root["thumb_" + i + "_mc"]._height = 40;
_root["thumb_" + i + "_mc"]._alpha = 60;
_root["thumb_" + i + "_mc"].onRollOver = function ()
{
trace (" click");
this._alpha = 100;
};
the positioning etc all works, but when i try to add an onRollOver action to each mc, nothing happens. if i create the movieclips and then NOT load the jpegs in, the onRollOver action works fine.
its extremely frustarting that i can target the movieclips for everything except the onRollOver. any ideas? thanks
code:
_root["thumb_" + i + "_mc"].loadMovie ("assets/images_flash/" + i + ".jpg");
_root["thumb_" + i + "_mc"]._x = (i * 43) - 30;
_root["thumb_" + i + "_mc"]._y = 160;
_root["thumb_" + i + "_mc"]._width = 30;
_root["thumb_" + i + "_mc"]._height = 40;
_root["thumb_" + i + "_mc"]._alpha = 60;
_root["thumb_" + i + "_mc"].onRollOver = function ()
{
trace (" click");
this._alpha = 100;
};