将swf文件上传到stencyl问题?

时间:2012-07-15 14:01:17

标签: actionscript-3 flash

好吧所以我使用stencyl引擎制作flash游戏,我想上传一个Swf文件。问题是我一直收到错误

  

TypeError:错误#1009:无法访问空对象引用的属性或方法。       at _247gamesonline_fla :: bn0_Symbol1_2 / frame1()

现在我去了那个有错误的fla文件的那一部分,并试图查看错误,但无法弄明白。这是代码:

stop();

var doMain:String = this.stage.loaderInfo.url;
        var doMainArray:Array = doMain.split("/");
        var domainname = doMainArray[2];
        var gamename = "nameofgame";

        var linktodjp = "http://www.247gamesonline.com/?        p=cat&order=2&tag=puzzle&utm_medium=partnergame&utm_campaign=" + gamename + "&utm_source=" + domainname + "&utm_content=partnergame";
var linktodjpfb = "http://www.facebook.com/connect/uiserver.php?app_id=201345053230176&next=http://www.3j.com/processfacebook.php%3Futm_source%3D" + domainname + "%26fgamet%3D76&display=page&cancel_url=http%3A%2F%2Fwww.3j.com%3F3Futm_source%3D" + domainname + "&locale=en_US&return_session=1&session_version=3&fbconnect=1&canvas=0&legacy_return=1&method=permissions.request&perms=publish_stream,offline_access,email,user_birthday,user_interests,read_friendlists";


buttonplay.addEventListener(MouseEvent.CLICK, playlogonow);
logo.addEventListener(MouseEvent.CLICK, gotowebsite);
logo.buttonMode = true;

stop();
function playlogonow(e:Event) {
logo.play();
gotoAndStop(2);
return;
}

function gotowebsite(e:Event) {
navigateToURL(new URLRequest(linktodjp));
return;
}

另外在代码的另一部分中,它只是说

on (release) {
_root.play();

}

帮助任何人?

1 个答案:

答案 0 :(得分:0)

很难说只有那个代码。无论如何,我建议在那里放置许多跟踪语句来确定哪个变量实际上等于 null 并导致该异常。然后采取相应的行动。