# Syntax help with dynamic this.i

**URL:** <https://forum.kirupa.com/t/syntax-help-with-dynamic-this-i/205956>\
**Category:** Uncategorized\
**Created:** [November 3, 2006, 4:04pm UTC](https://forum.kirupa.com/t/syntax-help-with-dynamic-this-i/205956 "2006-11-03T16:04:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe\_wolves](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@joe\_wolves](https://forum.kirupa.com/u/joe_wolves)\
**Post date:** [November 3, 2006, 4:04pm UTC](https://forum.kirupa.com/t/syntax-help-with-dynamic-this-i/205956/1 "2006-11-03T16:04:21Z")

</div>

Sorry for posting twice - there were database issues going on when I submitted the first time.

I have a photogallery where I’m dynamically loading full-size jpgs and then downsizing them to thumbnails. additionally, I’m creating another empty movie clip on top of each image so I can change the appearance of the images (alpha, blue tint, green tint, etc.)

so all of the thumb mcs are created in a loop and named mc\* (mc1, mc2, mc3, mc4 etc.) Then another empty movieclip is created as a child of the mc and named cover\* (cover1, cover2, cover3, cover4, etc.). If I debug and look at the objects, they all show up. Here is an example of one;

Movie Clip: Frame=1 Target="\_level0.thumbs\_mc.mc65"  
Shape:  
Movie Clip: Frame=0 Target="\_level0.thumbs\_mc.mc65.cover65"

So, I have a function that enlarges the image, but when the image gets clicked on, I also want to change the alpha property of the cover movieClip. Right now, I can make it work if I hard code in the cover like this;

setProperty(this.cover0, \_alpha, 0);  
or  
setProperty(this.cover1, \_alpha, 0);  
etc. for each cover mc.

what I want it to do is to dynamically pull in the number of the mc that is clicked. Right now, if I trace this.i I get the correct number of the mc that was clicked. I have tried many things such as

setProperty(this.cover\*, \_alpha, 0);  
setProperty(this.cover[this.i], \_alpha, 0);  
setProperty(this.cover+i, \_alpha, 0);

any many more.

This is killing me - can anyone help me with the syntax? I’m guessing it’s something simple that I’m missing.

Thanks in advance.🍺
