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?
Copy link to clipboard
Copied
the first problem i see is a function named speedline. ie, use different names for different things.