public function loadAPI()
{
var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
var api_url:String = paramObj.api_path || "http://www.kongregate.com/flash/API_AS3_Local.swf";
var request:URLRequest = new URLRequest ( api_url );
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, apiLoadComplete );
loader.load ( request );
this.addChild ( loader );
}
I get a null reference error on this line:
var paramObj:Object = LoaderInfo(root.loaderInfo).parameters;
Anybody know what I should do. I was just following the tutorial to implement it. I don’t quit understand that part of the code so I cannot fix it myself. Do I have to download something for the api to work? Thanks a bunch. Hopefully this can be fixed tonight because I need to add highscores to my game.