6

I keep getting this error in a Flash instrument I'm making:

1024 overriding a function that is not marked for override

The error was found in this line:

public function stop():void
wizzwizz4
  • 6,140
  • 2
  • 26
  • 62
James Kirkby
  • 1,716
  • 5
  • 24
  • 46
  • dynamic, const, final, override, implement, extends, public, internal, protected, private, custom_nameSpace, void, use... what else am i missing?? – Muhammad Umer Jan 11 '14 at 15:39

2 Answers2

15

The error indicates that you have a method named stop in base class. So in derived class you need to add override in the method declaration.

public override function stop():void
       ^
taskinoor
  • 45,586
  • 12
  • 116
  • 142
3

You cannot use the function name stop in a class that extends MovieClip.

francis
  • 5,889
  • 3
  • 27
  • 51
  • You can i accidently had the linkage name the same as the movie clip name which was causing the error – James Kirkby Mar 29 '12 at 17:49
  • stop is a reserved method on MovieClip, used for stopping the timeline animation. If your class extends MovieClip you won't be able to use this method name without overriding it: public override function stop():void – francis Mar 29 '12 at 22:21