Package problem: function an undefined property

I’m trying to convert a working action into a package. Everything works fine in a Flash frame. I copied and pasted it into a class declaration and made the main function a public function. The action includes a timer declaration:

var fadeTimer:Timer=new Timer(50);
fadeTimer.addEventListener(TimerEvent.TIMER,fadeImage);

Problem: In the package (but not in a frame), the function name “fadeImage” is thrown back as an undefined property.

Again, copy & paste and it works fine in a Flash frame. I can’t figure out what AS3 wants here. Does anyone know why the function is called successfully in a Flash frame but not in a package?

Thanks.

PS: The apparent space in fadeImage above is something this post is doing. I’ve tried placing both the function and the timer declaration inside and outside the public function. I’ve tried declaring “public var fadeTimer …” No difference.