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.
1 user commented in " AS3 ReferenceError: Error #1056 "
Follow-up comment rss or Leave a Trackback[...] discovered here Quote: In Flash CS3, when you have instances (Movieclips) on the main timeline (Stage) with [...]
Leave A Reply