# loadMovie if hitTest is true

**URL:** <https://forum.kirupa.com/t/loadmovie-if-hittest-is-true/47870>\
**Category:** flash\
**Created:** [April 7, 2004, 8:35pm UTC](https://forum.kirupa.com/t/loadmovie-if-hittest-is-true/47870 "2004-04-07T20:35:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)\
**Post date:** [April 7, 2004, 8:35pm UTC](https://forum.kirupa.com/t/loadmovie-if-hittest-is-true/47870/1 "2004-04-07T20:35:47Z")

</div>

Okay so I have an image that is sliced up into square bits and labelled Winter\_r1\_c1, Winter\_r1\_c2 etc. for 3 rows, 4 columns. I have an empty movie clip for each slice labelled the same as the jpgs. I have all 12 movie clips inside of another movie clip called “tiles”. This is on the stage where I want it. I am able to load all the tiles and scale them to fit the area I need using code that Norie helped me with a while ago (whatever happenned to that guy anyway? He was well on his way to Mod status!). Anyway, here is the code I have now:

```php

onClipEvent (load) {
  x = 1;
  perRow = 4;
  currentRow = 0;
  currentCol = 0;
  for (i=1; i<4; i++) {
     for (j=1; j<5; j++) {
          if (!((x-1)%perRow)) {
	currentRow++;
	currentCol = 0;
	}
         currentCol++;
       this["Winter_r"+i+"_c"+j].loadMovie("tiles/Winter_r"+i+"_c"+j+".jpg");
       this["Winter_r"+i+"_c"+j]._xscale = this["Winter_r"+i+"_c"+j]._yscale=this["Winter_r"+i+"_c"+j]._xscale/2;
      this["Winter_r"+i+"_c"+j]._x = currentCol*100-100;
      this["Winter_r"+i+"_c"+j]._y = currentRow*100-100;
      x++;
      }
   }
}

```

Now I need to modify this and I can’t make it work. I have a little box on the stage that the user drags around. Whenever the box hits a movie clip, even if it is overlapping more than one, I want the appropriate jpg to load into it’s movie clip. So in other words, when you drag the box around the stage the bits of the picture appear but then go away (unload) when the box moves on.

Is this possible? I can’t even get the hitTest part to work argh!!
