In Flash CS3, when you have instances (Movieclips) on the main timeline (Stage) with instance name on them and “Automatically declare stage instances” is off (File->Publish Setting->Flash->Actionscript 3.0 setting), You will need to declare properties for the document class with the same instance names or else you will get the error messages…

For example, if you have 2 movie clips named “box” and “circle” on the stage, in document class (Main), you will need to write like:

package {
	// Import class
	import flash.display.*;
	// Main
	public class Main extends Sprite {
		// Properties
		public var box:MovieClip;
		public var circle:MovieClip;
		// Constructor
		function Main() {}
	}
}

The document class properties will need to be public too since the movie clips are on stage that is public accessible.