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:
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!!