Hello evryone, Im not a pro in Action script but
I’m trying to display thumbnails with a for loop but i would like that each thumbnail have an onrelease action. Do somebody can Help me ??? i did 3 forum and no answers.
here is my script:(note: i use trace() for look if my loop works aswith the onrelease function)
var posX = 163;//1st position
var posY = 103;//1st position
var Dec = 0;// var for the space between thumbnails set to 0
for (i=0; i<5; i++) {
var Num = i+1;
var Clp_name = "clip"+Num;
var container = (container+Num);
var container:MovieClip = this.createEmptyMovieClip(Clp_name, this.getNextHighestDepth());
container.loadMovie("images/images.jpg",this.getNextHighestDepth());
container._x = posX;
container._y = posY+Dec;
this.Clp_name.onRelease = function() {
WhoIsOn = i-1;
trace(WhoIsOn);
};
trace(Clp_name);
Dec = Dec+40;// increment the space between thumbnail
}
I also tryed:
this[Clp_name].onRelease = function() {
WhoIsOn = i-1;
trace(WhoIsOn);
and
this.container[Clp_name].onRelease = function() {
WhoIsOn = i-1;
trace(WhoIsOn);