问题
I am getting a strange issue in Flash CS5. I have a .fla file that was working fine up until recently. Now, when I Ctrl-Enter to Test Movie...nothing happens.
I have a Document Class set up (and when I click the pencil button, it opens up the right script, so Flash knows where the code is) called Main. In the constructor, there is a trace('Main()')
just so I know the constructor got called, but that trace isn't showing up. A few days ago this same code was working fine, so i'm guessing I knocked around a setting or two in the IDE (not sure which, since Flash has the classpath set correctly)
Thanks in Advance,
-Esa
EDIT: Here's a worrying line from the Size report...Why is Actionscript Bytes '0'?
Scene Shape Bytes Text Bytes ActionScript Bytes
------- ----------- ---------- ------------------
Scene 1 0 0 0
EDIT 2: I also added a trace
to the timeline, and that still doesn't show up (and ActionScript Bytes is still 0...the swf size hasn't actually changed even though I added the code).
Also I have restarted the program several times, and even restarted my computer (and did the 'Delete ASO' thing that Mattias suggested). No dice.
回答1:
Try copying only the files you need (.as
, .fla
) into a different folder and recompile. If a big project has too many files within the main directory I think it just gets tired midway while compiling
回答2:
Seems like Flash lost the connection to the document class.
First try to remove the cache:
- Control -> Delete ASO
- Hit Ctrl-Enter
If it still does not work:
- Remove the document class and hit Ctrl-Enter.
- Add the document class again and give it a new try.
If it still does not work, try changing to an other Document Class to see if that works.
Hope this helps.
回答3:
Are you sure the FLA is set to AS3 (and not AS2) ?
来源:https://stackoverflow.com/questions/7599542/flash-cs5-wont-execute-as3-code