ReferenceError: Error #1065: Variable SimpleMP3Player is not defined.
I had set the linkage, in the linkage properties, of a symbol to point to the class SimpleMP3Player.
The class was written as follows:
packageI checked the adobe live docs and read:
{
import flash.display.*;
class SimpleMP3Player extends MovieClip
{
function SimpleMP3Player()
{
trace("MP3 Player instantiated");
}
}
}
1065 Variable _ is not defined. You are using an undefined lexical reference. For example, in the following statements, the statement trace(x) generates an error because x is undefined. However, the statement trace(y) doesn't generate an error because y is defined:
trace("hello world")
trace(x) // x is undefined
var y
trace(y) // No error, y is defined.
It didn't take too long to see that I had simply forgotten to declare the class SimpleMP3Player as public. Nevertheless, there could have been a much better error for this. When you take your compiler classes, they always teach you to include common errors in your parser so you can provide useful error messages. Apparently the Adobe AS3 developers weren't paying attention.
22 comments: