Forum Moderators: open

Message Too Old, No Replies

Flash: load and manipulate jpg's

actionscript woes

         

benihana

1:42 pm on May 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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 a 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?

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;
};