Return to Snippet

Revision: 7061
at July 3, 2008 05:54 by 1man


Initial Code
//In myBaseClass.as
package {
	public class myBaseClass {
		public function sayHello():void {
			trace("hello");
		}
	}
}
//In mySubClass.as
package {
	public class mySubClass extends myBaseClass {
		public function sayGoodbye():void {
			trace("goodbye");
		}
		override public function sayHello():void{
			trace("This is a trace!");
		}
	}
}

Initial URL

                                

Initial Description
How to create a basic class in AS3 and extend it if needed.

Initial Title
Basic Package and Class Creation / Extend

Initial Tags
class, actionscript

Initial Language
ActionScript 3