I have 2 .fla files and one of them is associated with a class file called DocumentMain, it is a game. and what I want is when I click "stat" on the first .fla file it takes me to the game swf file.
I did the myLoad function and it look like this :
btnstart.addEventListener(MouseEvent.CLICK,gamecontent);
function gamecontent(myevent:MouseEvent):void
{
var myLoader:Loader = new Loader ();
var myURL:URLRequest = new URLRequest("game.swf");
myLoader.load(myURL);
addChild(myLoader);
}
but I get an Error which is :
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at DocumentMain()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…