Code:
function f_choosePhoto(photoNum)
{
	var photos:Array = ["photo0","photo1","photo2"];
	
	var path:String = (photos[photoNum]);
	
	var bdata = new this[path](560, 380); 
	var bmp = new Bitmap(bdata); 
	addChild(bmp); 
}
photoNum is returned when a button is clicked. The Array contains the class names of all the photos stored in the library.

What's supposed to happen is that when the button is clicked, the correct picture is shown on the screen. What I get is a runtime error:

TypeError: Error #1007: Instantiation attempted on a non-constructor.
at Tour1_fla::Photo_3/f_choosePhoto()
at Tour1_fla::MainTimeline/f_showPhoto()
at Tour1_fla::MainTimeline/onMouseClick()

I've cobbled the AS together from a couple of seperate tutorials, and if I replace "new this[path](560, 380);" with "new photo1(560, 380);" it works. So I know I'm doing something wrong right there, but I've no idea what.

Can anyone help? Thanks in advance