Adding onRelease to an empty movie clip

Hello all…

I have been searching high and low in the forums, but I cannot seem to find the answer I am looking for.

I am trying to load an external swf into an empty movieclip and then add an onRelease function to that movieclip. My code looks like this, but does not seem to work :frowning:

		
_root.createEmptyMovieClip("flashad"+adpage, 250+i);
this["flashad"+adpage].loadMovie("external.swf");
this["flashad"+adpage].onRelease = function() {
	trace("hit");
};

The code is inside of a for loop where i increments by 1.
adpage is a variable with a numeric value.