# Referencing static movieclips from XML

**URL:** <https://forum.kirupa.com/t/referencing-static-movieclips-from-xml/267164>\
**Category:** Uncategorized\
**Created:** [July 29, 2008, 10:35am UTC](https://forum.kirupa.com/t/referencing-static-movieclips-from-xml/267164 "2008-07-29T10:35:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sugarfree](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@sugarfree](https://forum.kirupa.com/u/sugarfree)\
**Post date:** [July 29, 2008, 10:35am UTC](https://forum.kirupa.com/t/referencing-static-movieclips-from-xml/267164/1 "2008-07-29T10:35:38Z")

</div>

Hi all,  
I posted before but don’t think I explained myself very well 😑

I’m trying to do an interactive map. When someone rolls over the store unit, the colour changes and a little popup with store logo and info appears (loaded from XML)

The XML loading etc. works fine. But I can’t figure out how to reference the correct movieclip on rollover.

I created this little function which finds all the movieclips but it seems wrong cos it outputs ALL unitnames each time a movie is rolled over - and surely that’s not very processor friendly?

```auto

function Floorplan() {
 
//Find all the movie clips in the 'holder' mc
 for (var property in holder.thisLevel) {
 // Check if the current property of myClip is a movie clip
  if (typeof holder.thisLevel[property] == "movieclip") {
 holder.thisLevel[unitname]=holder.thisLevel[property];
 trace(holder.thisLevel[unitname]);
 holder.thisLevel[property].onMouseDown = floorplanOnPress;
 holder.thisLevel[property].onRollOver = floorplanOnRollover;
 holder.thisLevel[property].onRollOut = floorplanOnRollout;
 
 }
 
}
}

```

I guess what I’m asking is, is there a way of linking static movieclips already on the stage to ones generated from the XML?

Thanks in advance!
