使用 AS3 的 Flash CS5 中奇怪的 SWF 加载问题
我在 SO、Google 和 Bing 上寻找问题的解决方案,但没有成功。
注意:这是关于 Windows 7 Pro x64 上的 AS3/CS5。
我有一个在 AS3 中加载另一个 SWF 的 SWF。
昨天早上,一切正常。
然后,我对另一个完全独立的 SWF 以及一些 XML 内容文件进行了一系列更改,下次运行该项目时,第二个 SWF 在第一个 SWF 加载后开始闪烁并滚动其内容。
我不知道我做了什么导致了这个问题,也没有任何线索!
我浪费了一整天的工作时间,只需要 10 分钟。
加载 SWF 确实加载了有问题的 SWF,并且加载 SWF 的文档类中的跟踪语句执行得很好,但似乎没有执行第二个 SWF 的文档类构造函数,因为我没有看到其中正在执行任何跟踪语句。
我在星期四遇到了同样的问题,结果是与第二个 SWF 相关的类中存在语法错误,并且很快得到了解决。
但是,这次没有更改与问题 SWF 相关的代码,并且问题 SWF 在严格模式下可以正常编译。
我从笔记本电脑(Windows 7 Pro 32 位)复制了代码,验证一切正常,并且在我的开发 PC 上也遇到过同样的问题。
我不记得对我的 PC Flash/Actionscript 开发环境进行过任何更改,并且想撕掉我没有的头发!
目前我正在使用笔记本电脑,但这不是永久的解决方案。
有谁知道我如何系统地追踪这个问题???
我开始后悔自己曾经接触过 Flash/AS3;不可能在整个开发环境上运行 diff 并找出到底出了什么问题。
我在 Windows 事件日志中没有看到任何内容。有 Flash 日志可供我查看吗?到目前为止,我还没有找到任何东西,并诅咒我看到Flash的那一天。
有什么想法吗?
谢谢你! 克里斯
I've looked for the solution to my problem on SO, Google and Bing, but to no avail.
NB This is regarding AS3/CS5 on Windows 7 Pro x64.
I have a SWF that loads another SWF in AS3.
Yesterday morning it was working fine.
Then I made a bunch of changes to another SWF, completely separate, and to some XML content files and the next time I ran the project the second SWF started to flash and scroll through its content once it was loaded by the first SWF.
I couldn't figure out what I did to cause the problem and have NO clue!
I wasted an entire work day for what should have taken only 10 minutes.
The loading SWF does load the problem SWF and trace statements in the document class for the loading SWF execute fine but it does NOT appear that the second SWF's document class constructor is executed as I don't see any trace statements in it being executed.
I had the same issue issue on Thursday and it turned out to be a syntax error in a class relevant to the second SWF and that was quickly solved.
However, NO code relevant to the problem SWF was changed this time around and the problem SWF compiles fine with strict mode on.
I copied the code from my laptop (Windows 7 Pro 32bit) where I verified everything works fine and I got the same problem once on my dev PC.
I don't remember changing anything to my PC Flash/Actionscript development environment and want to tear out hair I don't have!!!
For now I'm working on my laptop but that's not a permanent solution.
Does anyone know HOW I can systematically track down this problem???
I'm beginning to regret I ever got into Flash/AS3; it's just not possible to run a diff on the entire dev environment and find out exactly what's wrong.
I don't see anything in the Windows event logs. Are there Flash logs that I could take a look at? So far I haven't found anything and curse the day I looked upon Flash.
Any ideas??
Thank you!
Chris
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您声明第二个 SWF 不考虑文档类,因此您应该能够通过使用文档类创建基本测试 swf 来重现错误。
有时,回到基础知识可能是解决问题的好方法...
如果您无法使用基本 SWF 重现错误,则这表明您的第二个 SWF 中存在错误。如果它是一个如此大的系统,那么将其分解为更小的组件是有意义的,这将有助于识别问题并可能形成更好的结构。
如果您可以重现该错误,那么我建议您重新安装...
Since you state that the second SWF doesn't take account of the Document Class, you should be able to reproduce the error by creating a basic test swf with a Document Class.
Sometimes, going back to basics can be a good approach to problem solving...
If you're not able to reproduce the error with a basic SWF , this would indicate an error in your second SWF. If it's such a big system, it would make sense to break it down in smaller components , this would help identify the problem and probably make for a better structure.
If you can reproduce the error , then I would suggest to look at reinstalling...