简体   繁体   中英

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.

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

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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