First Post :D Need help with dynamically loading swf using prototypes

I just tried to get some help over at tutoiral forums, but bleh not much luck so far, seems a bit cold over there, this is a nice warm forum!

OK, this is my first post at kirupa, I really look forward to getting to know some people here. :beam: :beam:

(For a better understanding please look at the files I have attached)

Here is the situation, Im making a flash image viewer, its really pretty simple.

When you click each navigation button it slides to each section of pictures, each picture has an invisible button on top of it and each invisible button has its own individual instance name. When you click the picture (invisible button) it should load a seperate external swf into another movie clip I have set up. However because I have about 216 pictures (and hence 216 swfs) I dont want to have to make add a loadmovie on each button, that would get very repetitive and would increase the file size.

SO Im trying to be a smart coder here and do it dynamically. I KNOW this is possible. I want the swf to load based on the instance name of the button. I have seen this done with text files before using the _name command and it worked marvelously using loadvars so im just trying to do it using loadmovie instead.

Have a look at my code.

//======================================
//========================Dynamic Movie load
//this movie initializes 2 prototypes then assigns the prototypes to each button
//the first is called LOADPICTURE - this loads the swf into the movie clip named LOAD_MC
//the second is called MASTER - this determines when the buttons are pressed
//thus we can load our files dynamically

//prototype 1 named LOADPICTURE
//determine the name of the swf to be loaded determined by which button is pressed using _name

MovieClip.prototype.loadPicture = function() {
var finalPath = (“pictures/” + this._name + “.swf”);
_root.load_mc.loadMovie(finalPath);
trace(finalPath)
};

//for example a succesful load should be traced and look like “pictures/picture1.swf”
// so then this should work _root.load_mc.loadMovie(finalPath);
//because of this var finalPath = (“pictures/” + this._name + “.swf”);
// why cant I see trace finalpath in the output when I click here?

//prototype 2 named MASTER
//assign the prototype LOADPICTURE to MASTER

MovieClip.prototype.master = function(){
this.onRelease = loadPicture;
};

//Assign the prototype MASTER to each one of the Movie Clips

for (var i = 1; i <217;i++){
this[“picture”+i].master()
trace(i)
};

//I can see trace of variable “i” fine, why cant I see trace finalPath?
//are they somehow not seeing what button I click?
//or is it not being assigned properly?

If someone could please have a look at this and tell me what Im doing wrong, I get the feeling its something obvious Im just overlooking. (thats how most of my problems end up being )

Thanks!(I hope this hasnt been too long)