A term is undefined and has no properties

Explorer ,
Jul 24, 2021 Jul 24, 2021

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();

TOPICS
ActionScript

Views

134

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

the problematic line of code needs to be in a class file that extends a displayobject (eg, a movieclip).

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

it is

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 24, 2021 Jul 24, 2021

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

is that line in the constructor?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

hmm heres the file maybe you can find something?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 24, 2021 Jul 24, 2021

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

it's not in the constructor.  use trace(this) to confirm the issue.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

at what part exactly?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 24, 2021 Jul 24, 2021

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

put trace(this) just above the line with the error message and you'll see it's undefined.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 24, 2021 Jul 24, 2021

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines