1024 overriding a function that is not marked for override
Asked Answered
P

2

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
Pourboire answered 29/3, 2012 at 15:27 Comment(1)
dynamic, const, final, override, implement, extends, public, internal, protected, private, custom_nameSpace, void, use... what else am i missing??Goby
W
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
       ^
Winebaum answered 29/3, 2012 at 15:31 Comment(0)
D
3

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

Deniable answered 29/3, 2012 at 16:24 Comment(2)
You can i accidently had the linkage name the same as the movie clip name which was causing the errorPourboire
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():voidDeniable

© 2022 - 2024 — McMap. All rights reserved.