hello every one, I trying to get move from AS2 to AS3. I get errors in AS3 that I don't understand. I saw this code on this form but I can't get it to work.

They are both in the same file directory

afx.as
Code:
package   {
	public class Greeter {
		public function sayHello():String {
			var greeting:String = "Hello World!";
			return greeting;
		}
	}
}
afx.fla
Code:
var myGreeter:Greeter = new Greeter();
mainText.text = myGreeter.sayHello();
The Error
PHP Code:
5000The class 'afx' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type
Thank you for the help