AS3 Embed Code Error
package {
import flash.display.*;
public class main extends Sprite {
[Embed(source="file.swf")]
public static const MY_FILE:Class;
public function main() {
var mySprite:Sprite = new MY_FILE() as Sprite;
trace("done " + MY_FILE);
addChild(mySprite);
}
}
}
am getting this error.
done [class main_MY开发者_StackOverflow_FILE]
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Filters()
Does anyone know what is the reason?
The problem is probably in your embedded swf. Your Script seems fine.
精彩评论