尝试为Flash Player 6.0执行优化代码。
有一个代码
if (eval(Movie + "." + NameTextField) == undefined) { // If undefined, the warning will be issued when accessing
Movie.createTextField(NameTextField, Movie.CountDepth++ , X, Y, Width, Height);
}
if (eval(Movie+"."+Name) == undefined){ // If undefined, the warning will be issued when accessing
Movie.createEmptyMovieClip(Name, (NumDepth == undefined )?(Movie.CountDepth++):NumDepth );
}
但是在第一次传递时,此代码始终在文件flashlog.txt中发出警告。
请勿正确采访但尚未声明的MovieClip或TextField?
答案 0 :(得分:1)
试试这个:
var CountDepth:Number = 0; // you may already have this else where in your code
if (!Movie.NameTextField) {
Movie.createTextField(NameTextField, CountDepth++ , X, Y, Width, Height);
}
if (!Movie.Name){
Movie.createEmptyMovieClip( Name, CountDepth++ );
}