|
metadata
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
|
|
|
metadata
Sometimes the line numbers are messed up. I’ve gotten errors like that too, try looking for the source of the actual error.
|
|
|
metadata
> *Originally posted by **[qwerberberber](/forums/4/topics/353572?page=1#posts-7336859):***
>
> 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.
|
|
|
metadata
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.
|
|
|
metadata
> *Originally posted by **[SumGato](/forums/4/topics/353572?page=1#posts-7337053):***
>
> 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.
|
|
|
metadata
> *Originally posted on **[The Daily WTF forums](http://thedailywtf.com/):***
>
> TRWTF is timeline code.
|
|
|
metadata
> *Originally posted by **[player\_03](/forums/4/topics/353572?page=1#posts-7337130):***
> > *Originally posted on **[The Daily WTF forums](http://thedailywtf.com/):***
> >
> > 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.
|
|
|
metadata
Timelining for animations is fine (if you’re not blitting).
|
|
|
metadata
> *Originally posted by **[feartehstickman](/forums/4/topics/353572?page=1#posts-7338103):***
>
> 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.
|
|
|
metadata
> *Originally posted by **[feartehstickman](/forums/4/topics/353572?page=1#posts-7338103):***
>
> 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.
|
|
|
metadata
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
|
|
|
metadata
> *Originally posted by **[Idiral](/forums/4/topics/353572?page=1#posts-7340868):***
>
> 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).
|
|
|
metadata
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.
|
|
|
metadata
> *Originally posted by **[Idiral](/forums/4/topics/353572?page=1#posts-7341491):***
>
> 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.
|
|
|
metadata
I said the same as SumGato.
> *Originally posted by **[Draco18s](/forums/4/topics/353572?page=1#posts-7341540):***
> > *Originally posted by **[Idiral](/forums/4/topics/353572?page=1#posts-7341491):***
> >
> > 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.
|
|
|
metadata
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.
|
|
|
metadata
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_
|