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

Problem creating instances of a Symbol (Error 1046)

New Here ,
Apr 11, 2021 Apr 11, 2021

Copy link to clipboard

Copied

Hi all,

 

I'm working on an animation and I'm trying to get "speed lines" to fly across the background using ActionScript. I followed a tutorial I found which gave me the code below. It's supposed to spawn symbols and move them across the stage. However the code does not compile. I'm met with error 1046 "Type was not found or was not a compile-time constant: speedline." Presumably, the problem is that it can't identify a "speedline" class, symbol, object, whatever it needs in order to instantiate a new one.

 

As seen in the screenshot below, I've defined the class "speedline" in the Symbol Properties. But when I click the checkmark, I get the error "A definition for this class could not be found in the classpath, so one will be automatically generated in the SWF file upon export." This doesn't seem to happen as the exported SWF still does not show the lines. I've also tried saving the speedline.as script in the same folder as the .fla file with no luck. There doesn't seem to be much I can do to locate where it is within my project. For example if speedline is the property of another class that I'm supposed to be referencing. E.g. Movieclip.speedline, but that didn't work either.

 

I'm not sure what I'm doing wrong here. I don't know if I'm not searching the correct terms to solve the problem on my own, but I've spent the better part of an hour with no luck. Any ideas?

Screenshot 2021-04-11 025640.png

TOPICS
How to

Views

167

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 ,
Apr 11, 2021 Apr 11, 2021

Copy link to clipboard

Copied

LATEST

the first problem i see is a function named speedline.  ie, use different names for different things.

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