Error publishing, exporting, or testing a movie

When publishing, exporting, or testing a movie in Flash CS4 Professional, you receive the following Output window error:

"ReferenceError: Error #1065: Variable {Class Name} is not defined."

The Flash CS4 Professional compiler is slightly different from the previous versions. If two classes have the same name, or if the main document class is the same as an imported class, this error will be thrown at compile time.

For example, if your main FLA is named Calendar.fla, then a Calendar document class will automatically be generated at compile time (or you can write one yourself and specify it in Publish Settings).

In this case, you may not have another folder or class named Calendar in the classpath. For example, having a document subfolder structure such as will return error #1065 at compile time.

Solution: Use unique class and folder names

Ensure that no class or folder in the document's classpath has the same name as the original document's class. In the above example, renaming the Calendar folder to Calendar2 is enough to resolve the error.

Keywords: kb407189

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy