Errors

From WikiFlashed

Jump to: navigation, search

You will find a lot of weird Flash errors in your career. I hope if not all, you can find at least some of the stuff here useful. It would be great if anyone can contribute to this topic as well.

1046

  • 1046: Type was not found or was not a compile-time constant : MovieClip
  • Compile Error

This happens when you are trying to dynamicly create a Custom Sprite with some Movieclips already sitting in side the sprite asset. For an example, if you have a Rabbit Sprite that contains parts like "arm", "ear" and "leg", this error will occur regardless if you give the body parts a stage name or not. This same goes for any other type of Classes like SimpleButton, Sprite or custom classes.

Solution: Make you that you have the line "import flash.display.MovieClip" inside the Rabbit Sprite class.

#1056

  • ReferenceError: Error #1056: Cannot create property right on com.blah.MyRabbitClass.
  • Runtime Error

This is a really annoying problem when you are trying to do things in the same manner in the AS2 times. Using the same Custom Rabbit Sprite example above, whenever you give body parts a variable name, this error will happen when your flash file has "automatically declare stage variables" checked in the file AS3 setting.

Solution: Simply change the Custom Rabbit Class to dynamic by adding "dynamic" in front of  "public class Rabbit extends Sprite" ...
google ads
Personal tools