If you are adding this to another class, the reference to the stage in the init method is probably causing the error.
The stage is not a valid reference until the class instance is actually on the displaylist.
When you do this:
ActionScript Code:
var mainChar:MainCharacter = new MainCharacter();
The constructor is immediately called and a reference to the stage is made in the init() method, resulting in the error.
The stage is not available until you do this:
The solution is listen for Event.ADDED_TO_STAGE in the MainCharacter class. This will trigger the Event handler when you call addChild(mainChar);
Make the reference to the stage in the Event handler.