Copy link to clipboard
Copied
I have this error on this line
// listener
this.addEventListener(Event.ENTER_FRAME, frameHandle, false, 0, true); <--- this is the line that has the error
These are the handles
// listener
private function frameHandle(event:Event):void {
if (isSystemPaused() == false) {
// basic
movingHandle();
actionHandle();
positionHandle();
updateMiniMap();
flyingHandle();
pushHandle();
updateHealthBar();
// attack
unitHitTestHandle();
Copy link to clipboard
Copied
the problematic line of code needs to be in a class file that extends a displayobject (eg, a movieclip).
Copy link to clipboard
Copied
it is
Copy link to clipboard
Copied
thats why im confused cause i have like 20 other files that are formatted the exact same and they work perfectly fine its seems a tradition with animate when adding a new file and following the same format it just dosent like it
Copy link to clipboard
Copied
is that line in the constructor?
Copy link to clipboard
Copied
Copy link to clipboard
Copied
also i would assume so considering like i said i have like other files that are exactly the same format and they work fine
Copy link to clipboard
Copied
it's not in the constructor. use trace(this) to confirm the issue.
Copy link to clipboard
Copied
at what part exactly?
Copy link to clipboard
Copied
i found it and it just made it worse it makes more errors also none of my files have it in the constructor code so why would i need to add it if my other files work perfectly fine
Copy link to clipboard
Copied
put trace(this) just above the line with the error message and you'll see it's undefined.
Copy link to clipboard
Copied
alright well i removed it for now since it wasnt my priority and i want to get my other stuff done first so ill come back to this post or make a new one when i actually need it 🙂 thanks for the help though
Copy link to clipboard
Copied
you're welcome.