MovieClip prototype, attachMovie and var

I’ve got a MovieClip.prototype function that loads an mc from the library using attachMovie. I want the mc to be loaded to be determined by a var that I determine based on which button is pressed.

It won’t work for some reason. It seems like the prototype won’t update the var in the attachmovie.

Example:

MovieClip.prototype.fadeIn = function() {
	i = 1;
	loadybox = _root.attachMovie(loadBox, "loadybox"+i, i);
}
var background:String = "back_1";
button1.onRelease = function() {
var background:String = this._name;

Obviously the buttons and backgrounds have the same name. I’ve tried adding in a

delete background

to the onRelease, but when I trace it it becomes undefined after deleting.

Any suggestions on how to set a variable to determine which mc will be loaded by button pressing?