Flex 共享对象崩溃
我正在开发一个使用共享对象在我的服务器上存储信息的 Flex 项目。我不是 100% 确定如何做到这一点,所以我在查找教程并遇到了这段代码:
nc = new NetConnection();
nc.connect("rtmp://[website here]");
so = SharedObject.getRemote("ballPosition", nc.uri, false);
so.connect(nc);
但是当它到达第三行时,它崩溃了。遗憾的是,我不知道如何使用 Flex 调试器,我现在正在研究这一点,但我想我会将其发布在这里并希望得到最好的结果。提前致谢。
I am working on a flex project using sharedobjects to store information on my server. I am not 100% sure how to do this, so I was looking up tutorials and came across this bit of code:
nc = new NetConnection();
nc.connect("rtmp://[website here]");
so = SharedObject.getRemote("ballPosition", nc.uri, false);
so.connect(nc);
But when it gets to the 3rd line, it crashes. I don't know how to use the debugger for flex sadly enough, which I am looking into now, but I figured that I would post this here and hope for the best. Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我开始将其作为评论发布,但很快就变得太长了。
您可能会收到错误,因为您没有连接到服务器。如果您已连接,那么您将从第二行返回
true
。我会从那里开始。例如:另外,您可以尝试将其包装在 try/catch 块中,因为这会给您带来错误,但不会杀死您的应用程序(因为您是调试新手)。
总而言之,调试非常棒,在某些情况下可以为您节省大量时间。祝你好运!
I started posting this as a comment, but it quickly got too long..
You may be getting the error because you're not connected to the server. If you're connected then you'll get a
true
returned from your second line. I'd start there. eg:Also, you might try wrapping this in a try/catch block as that will give you the error, but won't kill your app (since you're new to debugging).
In all, debugging is simply awesome and can save you a lot of time in certain situations. good luck!