# Help reference a movieclip within a movieclip

**URL:** <https://forum.kirupa.com/t/help-reference-a-movieclip-within-a-movieclip/71767>\
**Category:** Uncategorized\
**Created:** [November 29, 2004, 1:00pm UTC](https://forum.kirupa.com/t/help-reference-a-movieclip-within-a-movieclip/71767 "2004-11-29T13:00:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nettemor](https://avatars.discourse-cdn.com/v4/letter/n/c4cdca/32.png) [@nettemor](https://forum.kirupa.com/u/nettemor)\
**Post date:** [November 29, 2004, 1:00pm UTC](https://forum.kirupa.com/t/help-reference-a-movieclip-within-a-movieclip/71767/1 "2004-11-29T13:00:22Z")

</div>

I need to reference a movieclip within a moviclip in a function, but cannot figure out how. The source is like this (look at the red text - here is my problem)

portfolioInfo = new XML();  
portfolioInfo.ignoreWhite = true;  
timeline = this;  
portfolioInfo.onLoad = function(){  
// when the xml loads, we should get the following:  
/\*  
\<PORTFOLIO\>  
\<PICTURE  
IMG\_START=“IMG-START/eiendom.jpg”  
IMG\_END=“IMG-END/eiendom.jpg”  
URL=“[http://www.bewebbed.no](http://www.bewebbed.no)”  
TARGET="\_top"  
/\>  
\</PORTFOLIO\>  
\*/  
curAtRow=0;  
curYpos=0;  
curXpos=0;  
bFirst=true;  
for (child = 0; child \< count; child++){  
currentPicture = portfolioTag.childNodes[child];  
currentPicture.attributes.IMG\_START  
currentThumb = menu\_mc.createEmptyMovieClip(“thumbnail”+child,child);

//counting amount of images on a row - max 3  
if (curAtRow==3) {  
curAtRow=1  
curYpos=curYpos+120;  
curXpos = 0;  
}  
else {  
curAtRow++  
if(bFirst) {  
curXpos=0;  
bFirst=false;  
}  
else  
{  
curXpos = curXpos+110;  
}  
}  
currentThumb.\_y = curYpos;  
currentThumb.\_x = curXpos;

// need to make another clip to hold and load the actual image jpg into  
// this will be placed in our currentThumb clip and simply serve the purpose  
// of loading and displaying that image  
// create image clip in currentThumb:  
image = currentThumb.createEmptyMovieClip(“thumbnail\_image”,0);  
image.loadMovie(currentPicture.attributes.IMG\_START);

currentThumb.TARGET = currentPicture.attributes.TARGET;  
currentThumb.IMG\_END = currentPicture.attributes.IMG\_END;  
currentThumb.URL = currentPicture.attributes.URL;

currentThumb.onRelease=function() {  
[color=red]this.image.loadMovie(this.IMG\_END);  
[/color] getURL(this.URL, this.TARGET);  
}  
portfolioInfo.load(“startside.xml”);
