Actionscript problemo, pls help

[SIZE=3][FONT=Times New Roman]Hi there…[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]I am trying to develop a way to load and unload pictures and zoom in to them in a dynamically way. This is done with the idea to save space in memory for further use.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]I was helped by Dawsonk a while ago and we came to this code:[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]

[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]currentLoc = 27;
var numRows = 8;
var numCols = 5;
var baseW = 300;
var baseH = 250;
var points = new Array();
var CT = 0;
for (var i = 0; i < numRows; i++) 
{
 for (var j = 0; j < numCols; j++) 
 {

  var myClip = gridMC.createEmptyMovieClip(CT, CT);
  myClip.createEmptyMovieClip("pic", 0);
  myClip._x = j * baseW;
  myClip._y = i * baseH;
  myClip.inView = false;
  myClip.isLoaded = false;
  CT++;
 }
}
var curCol = currentLoc % numCols;
var curRow = (currentLoc - curCol) / numCols;
gridMC._x = -(curCol * baseW);
gridMC._y = -(curRow * baseH);
gridMC[currentLoc].inView = true;
gridMC[currentLoc].isLoaded = true;
gridMC[currentLoc].pic.loadMovie(currentLoc + ".jpg");  // here loads the movie[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]function doCheck() {
 for (k in gridMC) {
  gridMC[k].inView = false;
 }
 points = [{x:0, y:0}, {x:baseW - 1, y:0}, {x:baseW - 1, y:baseH - 1}, {x:0, y:baseH - 1}];
 for (k in points) {
  gridMC.localToGlobal(points[k]);
  var newLoc = -(Math.floor(points[k].x / baseW) + (Math.floor(points[k].y / baseH) * numCols));
  gridMC[newLoc].inView = true;
  if (!gridMC[newLoc].isLoaded) {
   gridMC[newLoc].isLoaded = true;
   trace(newLoc);
   trace(gridMC[newLoc].pic._x);
   trace(gridMC[newLoc].pic._y);[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]   gridMC[newLoc].pic.loadMovie(newLoc + ".jpg");
[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]  }
 }
 for (k in gridMC) {
  if (!gridMC[k].inView && gridMC[k].isLoaded) {
   gridMC[k].isLoaded = false;
   gridMC[k].pic.unloadMovie();
  }
 }
}[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]
mc_up_arrow.onPress = function() 
{
 gridMC._y += 10;
 doCheck();
}
mc_down_arrow.onPress = function()
{
 gridMC._y -= 10;
 doCheck();
}
mc_left_arrow.onPress = function()
{
 gridMC._x += 10;
 doCheck();
}
mc_right_arrow.onPress = function()
{
 gridMC._x -= 10;
 doCheck();
}[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]

[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3][/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]Sadly, still some problems to solve. Cant load the entire picture. Since it is a 5 x 8 picture array. All the little pics cant be loaded, just part of it… and also cant zoom in or zoom out…[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]The idea is to load just part of the picture that is inside of the red square not the ENTIRE pic…and unload those ones that are outside of the same square.[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]Can anyone help me out pls?
Cheers.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]Leo.[/FONT][/SIZE]
The entire code is available…the little pics will have to upload later…