简体   繁体   English

带有AS3的Flash CS5中的时髦SWF加载问题

[英]Funky SWF loading problem in Flash CS5 with AS3

I've looked for the solution to my problem on SO, Google and Bing, but to no avail. 我一直在寻找针对SO,Google和Bing的问题的解决方案,但无济于事。

NB This is regarding AS3/CS5 on Windows 7 Pro x64. 注意:这与Windows 7 Pro x64上的AS3 / CS5有关。

I have a SWF that loads another SWF in AS3. 我有一个SWF,可以在AS3中加载另一个SWF。

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. 然后,我对另一个完全独立的SWF文件和一些XML内容文件进行了一堆更改,下一次我运行该项目时,第二个SWF文件在第一个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. 我只花了10分钟就浪费了整整一天的时间。

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. 加载SWF确实会加载问题SWF,并且文档类中的trace语句可以很好地执行,但似乎第二SWF的文档类构造函数未执行,因为我看不到它正在执行任何trace语句。

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. 我在星期四遇到了相同的问题,结果是与第二个SWF相关的类中的语法错误,很快就解决了。

However, NO code relevant to the problem SWF was changed this time around and the problem SWF compiles fine with strict mode on. 但是,这次没有更改与问题SWF相关的代码,并且在启用严格模式的情况下,问题SWF可以正常编译。

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. 我从笔记本电脑(Windows 7 Pro 32位)复制了代码,并在其中验证了一切正常,并在开发PC上遇到了同样的问题。

I don't remember changing anything to my PC Flash/Actionscript development environment and want to tear out hair I don't have!!! 我不记得要对我的PC Flash / Actionscript开发环境进行任何更改,并且想撕掉我没有的头发!!!

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; 我开始后悔曾经接触过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. Windows事件日志中没有任何显示。 Are there Flash logs that I could take a look at? 是否有我可以查看的Flash日志? So far I haven't found anything and curse the day I looked upon Flash. 到目前为止,我什么也没找到,并咒骂了看Flash的那一天。

Any ideas?? 有任何想法吗??

Thank you! 谢谢! Chris 克里斯

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. 由于您声明第二个SWF没有考虑文档类,因此您应该能够通过创建带有文档类的基本测试swf来重现该错误。

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. 如果您无法使用基本SWF重现该错误,则表明第二个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... 如果您可以重现该错误,那么我建议您考虑重新安装...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM