Oh Flash (Nonsensical Error)

17 posts

Flag Post

Symbol ‘RedWizard’, Layer ‘Layer 1’, Frame 1, Line 1 1024: Overriding a function that is not marked for override.

Here’s the code on that frame:

//comment

Yeah

 
Flag Post

Sometimes the line numbers are messed up. I’ve gotten errors like that too, try looking for the source of the actual error.

 
Flag Post
Originally posted by qwerberberber:

Sometimes the line numbers are messed up. I’ve gotten errors like that too, try looking for the source of the actual error.

If I take it out, it compiles.

And I don’t mean “this is the line it points to” I mean “this is the only code in that location.”

Originally it was stop(); but I commented it out (moved it to the class file) and it would still throw the error. Remove the comment and it compiles just fine.

 
Flag Post

The error might be because RedWizard is actually extending another class with timeline code and someway the functions that Flash Pro builds as framescript handlers get messed up.

 
Flag Post
Originally posted by SumGato:

The error might be because RedWizard is actually extending another class with timeline code and someway the functions that Flash Pro builds as framescript handlers get messed up.

Ah ha. Clever.

I checked and that’s it exactly.

 
Flag Post
Originally posted on The Daily WTF forums:

TRWTF is timeline code.

 
Flag Post
Originally posted by player_03:
Originally posted on The Daily WTF forums:

TRWTF is timeline code.

Its what happens when I go back to an old AS2 project and start rewriting it in AS3 using class inheritance. :P

Things like a timeline stop() don’t cause problems and do exactly what they’re supposed to until you duplicate and extend.

 
Flag Post

Timelining for animations is fine (if you’re not blitting).

 
Flag Post
Originally posted by feartehstickman:

Timelining for animations is fine (if you’re not blitting).

I use them for object states. In this case it was which direction the monster was facing.

 
Flag Post
Originally posted by feartehstickman:

Timelining for animations is fine (if you’re not blitting).

Even in that case it’s “okay”. Lots of people will draw their sprites from the timeline dynamically to their bitmaps.

 
Flag Post

The line number is often wrong. The problem is normally before the actual one it shows. It’s to do with the way it’s compiled. I’m not sure how it compiles exactly but it can compile even with errors in the code sometimes and when it’s running it will run fine until it reaches that line of code. Sometimes the line will even run fine but it won’t recognize the error until it reaches a line in the code and all of a sudden the scope is messed up or something…

I’m pretty new to AS3 so I’m not quite sure why it does some of the weird stuff it does. Maybe I just have a slightly faulty compiler.

Solution: one of your functions has the same name as a base class, use: override private function func() or if more appropriate rename your function

 
Flag Post
Originally posted by Idiral:

The line number is often wrong.

You are late to the party. You are wrong. Problem was solved. Check replies one (duplicate of your solution), two (refute), and three (actual solution).

 
Flag Post

Speak English yo.

I missed the reply with the answer, and I gave the same answer as him (which is apparently wrong?). Get over it.

 
Flag Post
Originally posted by Idiral:

Speak English yo.

I missed the reply with the answer, and I gave the same answer as him (which is apparently wrong?). Get over it.

Uh dude. The first reply is also wrong. SumGato had the correct solution in the 3rd reply (4th post).

You are in fact so late to this thread that the conversation derailed to a different topic entirely, which also wrapped itself up in a neat little bow.

 
Flag Post

I said the same as SumGato.

Originally posted by Draco18s:
Originally posted by Idiral:

Speak English yo.

I missed the reply with the answer, and I gave the same answer as him (which is apparently wrong?). Get over it.

Uh dude. The first reply is also wrong. SumGato had the correct solution in the 3rd reply (4th post).

You are in fact so late to this thread that the conversation derailed to a different topic entirely, which also wrapped itself up in a neat little bow.

Uhh yeah, I said the same as SamGato. Extending/Base class. Same thing.

And I added points about the compiler throwing errors in the wrong way which may have helped you in the future but if you don’t care, whatever. Don’t improve.

 
Flag Post

Idiral, he wasn’t using any function in his code, so he can’t modify it. The troubled functions are automatically created by the flash compiler to handle code in the timeline. I guess it doesn’t expect people to use class inheritance alongside timeline code and that’s why the function isn’t overriden correctly.

 
Flag Post

Ok, I’ll rip apart your solution line by line.

The line number is often wrong. The problem is normally before the actual one it shows.

It says “Symbol ‘RedWizard’, Layer ‘Layer 1’, Frame 1, Line 1”

I go there.

There is exactly 1 line of code, which is a comment. Line number is not wrong, for removing this comment causes it to compile. This line is clearly at fault.

It’s to do with the way it’s compiled. I’m not sure how it compiles exactly but it can compile even with errors in the code sometimes and when it’s running it will run fine until it reaches that line of code. Sometimes the line will even run fine but it won’t recognize the error until it reaches a line in the code and all of a sudden the scope is messed up or something…

Those are run time errors not compile errors. Completely different beast.

I’m pretty new to AS3 so I’m not quite sure why it does some of the weird stuff it does.

…And now you’ve dequalified yourself.

Maybe I just have a slightly faulty compiler.

Wat.

Solution: one of your functions has the same name as a base class

What function?
This is my code:

//

use: override private function func() or if more appropriate rename your function

Override/rename what function? THERE IS NO FUNCTION TO RENAME OR OVERRIDE