Load SWF help

Hi all,

I’ve recently started to learn AS3.0 and have hit a problem.

I need to load an external SWF into a movieclip, and get the name of the SWF from a variable from a class. The variable is called getSWF and is defined as

public var getSWF = "movie.swf";

When I trace(getSWF); on the first frame of the main time line it outputs fine. However when I use the following code on the movieclip :

var testtest= getSWF;
var imageRequest:URLRequest = new URLRequest (testtest);
var imageLoader:Loader = new Loader();
imageLoader.load(imageRequest);
addChild(imageLoader);

I get the error:

1120: Access of undefined property getSWF.

Though if I change the variable testtest to movie.swf it works fine, any ideas?

Cheers for looking