Function's function

is it possible to do something like this?



mc.onRelease = function() {
      testFunction(_root.releaseFlag, studentPanel, source);
}

studentPanel = function() {
     trace(mySource);
}

testFunction = function(myFlag, myFunction, mySource) {
	this.onEnterFrame = function () {
		if(myFlag == true){
		      myFunction(mySource);
		}else{
		      this.onEnterFrame = null;
		}
	}
}

so far, it works until when it comes to
myFunction(mySource);
doesn’t seems to be calling the function…

how do i get the myFunction to be called?