# Getting MCs with dynamic content to respond?

**URL:** <https://forum.kirupa.com/t/getting-mcs-with-dynamic-content-to-respond/63626>\
**Category:** flash\
**Created:** [September 8, 2004, 3:16pm UTC](https://forum.kirupa.com/t/getting-mcs-with-dynamic-content-to-respond/63626 "2004-09-08T15:16:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![7even](https://avatars.discourse-cdn.com/v4/letter/7/5f9b8f/32.png) [@7even](https://forum.kirupa.com/u/7even)\
**Post date:** [September 8, 2004, 3:16pm UTC](https://forum.kirupa.com/t/getting-mcs-with-dynamic-content-to-respond/63626/1 "2004-09-08T15:16:05Z")

</div>

Hi there!  
I’m currently working on a rather complex picture gallery and I’ve run across a problem I just can’t seem to solve:  
The galleries (there are a lot of them, that’s why I want to use AS in the first place) consist of 20 MCs that lie in another MC called “gal”. The thumbnails are loaded via script:

for (i in \_root.gal) {  
var link = “Pics/”+\_root.gallery+"/k/"+_+".jpg";  
var ziel = “\_root.gal.”+_;  
loadMovie(link, ziel);  
}

That part (I know the var strings don’t make sense without further knowledge) works perfectly fine. Of course, clicking a thumb should open the full pic and I just can’t get that part to work. I tried the following script (and ALOT of variations):

for (i in \_root.gal) {  
var link = “Pics/”+\_root.gallery+"/k/"+_+".jpg";  
var ziel = “\_root.gal.”+_;  
loadMovie(link, ziel);  
var extrakt = substring (_,2,2);  
var big = “Pics/”+\_root.gallery+"/g/"+extrakt+".jpg";  
gal_.onPress = function() {  
loadMovie(big, “\_root.full”);  
\_root.gotoAndStop(“vollbild”);  
}  
}

Unfortunately, the MCs don’t respond to the onPress-action. They only do, if I remove the first part (loading the thumbs), which of course is not an option.  
Any ideas???

You can mail me at webmaster(at)[soonmusic.net](http://soonmusic.net)

Thanx alot guys,  
7even

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 8, 2004, 4:05pm UTC](https://forum.kirupa.com/t/getting-mcs-with-dynamic-content-to-respond/63626/2 "2004-09-08T16:05:04Z")

</div>

sorry so quick  
first thought:

\_root[“gal”+i].onPress=function(){}

> [@7even](#):
>
> Hi there!  
> I’m currently working on a rather complex picture gallery and I’ve run across a problem I just can’t seem to solve:  
> The galleries (there are a lot of them, that’s why I want to use AS in the first place) consist of 20 MCs that lie in another MC called “gal”. The thumbnails are loaded via script:
> 
> for (i in \_root.gal) {  
> var link = “Pics/”+\_root.gallery+“/k/”+_+“.jpg”;  
> var ziel = “\_root.gal.”+_;  
> loadMovie(link, ziel);  
> }
> 
> That part (I know the var strings don’t make sense without further knowledge) works perfectly fine. Of course, clicking a thumb should open the full pic and I just can’t get that part to work. I tried the following script (and ALOT of variations):
> 
> for (i in \_root.gal) {  
> var link = “Pics/”+\_root.gallery+“/k/”+_+“.jpg”;  
> var ziel = “\_root.gal.”+_;  
> loadMovie(link, ziel);  
> var extrakt = substring (_,2,2);  
> var big = “Pics/”+\_root.gallery+“/g/”+extrakt+“.jpg”;  
> gal_.onPress = function() {  
> loadMovie(big, “\_root.full”);  
> \_root.gotoAndStop(“vollbild”);  
> }  
> }
> 
> Unfortunately, the MCs don’t respond to the onPress-action. They only do, if I remove the first part (loading the thumbs), which of course is not an option.  
> Any ideas???
> 
> You can mail me at webmaster(at)[soonmusic.net](http://soonmusic.net)
> 
> Thanx alot guys,  
> 7even

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 8, 2004, 9:43pm UTC](https://forum.kirupa.com/t/getting-mcs-with-dynamic-content-to-respond/63626/3 "2004-09-08T21:43:03Z")

</div>

> [@ipaqflash](#):
>
> \_root[“gal”+i].onPress=function(){}

Nope, doesn’t work either. But thanx alot anyway! 🙂
