• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

387

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
Community Expert ,
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).

Votes

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

Votes

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

Votes

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
Community Expert ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

is that line in the constructor?

Votes

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?

Votes

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

Votes

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
Community Expert ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

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

Votes

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?

Votes

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

Votes

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
Community Expert ,
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.

Votes

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

Votes

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
Community Expert ,
Jul 24, 2021 Jul 24, 2021

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

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