• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Library symbols and debugging error

Community Expert ,
Nov 26, 2010 Nov 26, 2010

Copy link to clipboard

Copied

I'm using

Flash CS4 with Win7 and if I create a movieclip symbol in an FLA file such class name such as GreenBox. When I put the following line into my actionscipt 3.0 code, I get the error: "You cannot debug this swf because it does not contain actionscript.  The line of code is:

var greenBox:GreenBox = new GreenBox();

Any ideas what's going on.  Never had these problems with CS3 and Win XP.

I did double check to see if I had the debugger version on Flash Player.

TOPICS
ActionScript

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 27, 2010 Nov 27, 2010

create a new directory that has no subdirectories.  save your fla into that directory and give it a new name (save as..).  save your document class into the same directory.  retest.

if you still have the same error, copy and paste it into google and see if something works for you.

Votes

Translate

Translate
Community Expert ,
Nov 26, 2010 Nov 26, 2010

Copy link to clipboard

Copied

you probably have a document class error but there are a variety of errors that can trigger that error message.  to debug, start removing /commenting out blocks of code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2010 Nov 26, 2010

Copy link to clipboard

Copied

Below is all that's in the code.  If I take out the line variable declaration line, I don't get the error, if it's in I get it.

package{
import flash.display.*
import flash.events.*

public class TestFlash extends Sprite{
  var greenBox:GreenBox = GreenBox()
 
  public function TestFlash(){
  }
 
}//end class
}//end package

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2010 Nov 26, 2010

Copy link to clipboard

Copied

and you have an error.  use:


package{
import flash.display.*
import flash.events.*

public class TestFlash extends Sprite{
  var greenBox:GreenBox = new GreenBox()
 
  public function TestFlash(){
  }
 
}//end class
}//end package

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

Yea, I miss typed that and forgot the "new", but even with that corrected, it still does not work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

do you see the same error?  if yes, copy and paste the error.  if no, what doesn't "work"?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

Here's the error I get:

swf error.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

create a new directory that has no subdirectories.  save your fla into that directory and give it a new name (save as..).  save your document class into the same directory.  retest.

if you still have the same error, copy and paste it into google and see if something works for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

Putting the FLA and the AS file in the same folder worked.  I've never had to do that before, but this is the first time I've used CS4 and win7.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

LATEST

sometimes weird things happen with flash.  i've rarely encounterd an unexplained problem but when i do, following the above instructions usually solves the problem.  i'm not sure if there are extraneous files that are being used by flash in the older directory/subdirectories, there's a cache issue or exactly what is happening.

but a solution that works for an unknown reason to solve a problem that occurs for an unknown reason is better than no solution.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 27, 2010 Nov 27, 2010

Copy link to clipboard

Copied

Here's a screen shot of the GreenBox''s properties.  If I remove the var line in my AS file. I don't get an error, but if I check "Export in frame 1" in the Symbol Proberties box, I get the error.

GreenBox.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines