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

error: 1026: Constructor functions must be instance methods.

New Here ,
Jul 18, 2010 Jul 18, 2010

Copy link to clipboard

Copied

I am follwoing a tutorial on linda.com about creating a website in Flash

everything was going well until i started trying to copy the action script in the online examples

now I keep getting this error message and can't figure out how to get rid of it:

1026: Constructor functions must be instance methods.

any assistance wouold be much appreciated, thank you

here is the action script I am using for my buttons:

stop();

tv.addEventListener(MouseEvent.CLICK, clickSection);

function clickSection(evtObj:MouseEvent){

gotoAndStop("tv");
}

TOPICS
ActionScript

Views

3.9K

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 18, 2010 Jul 18, 2010

Copy link to clipboard

Copied

what makes you think the error message is related to that code?


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
New Here ,
Jul 18, 2010 Jul 18, 2010

Copy link to clipboard

Copied

Maybe it is not related to the actionscript, any ideas?

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
LEGEND ,
Jul 18, 2010 Jul 18, 2010

Copy link to clipboard

Copied

Looks like you are using some class that has constructor nested into another function.

Most probably you have function on timeline of a library symbol that has the same name as a class that is assigned to 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
New Here ,
Jul 20, 2010 Jul 20, 2010

Copy link to clipboard

Copied

I am still getting the error message...

Any suggestions, the Flash file is attached

Thank you

Date: Sun, 18 Jul 2010 22:09:14 -0600

From: forums@adobe.com

To: chisholmrichard@hotmail.com

Subject: error: 1026: Constructor functions must be instance methods.

Looks like you are using some class that has constructor nested into another function.

Most probably you have function on timeline of a library symbol that has the same name as a class that is assigned to 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
LEGEND ,
Jul 20, 2010 Jul 20, 2010

Copy link to clipboard

Copied

Files cannot be attached any longer to the posts. In any case, you need to show code and explain what is going on in your symbols in terms of classes and function names.

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
New Here ,
Jul 20, 2010 Jul 20, 2010

Copy link to clipboard

Copied

I'm sorry, I am still not following what you are saying

here is what I have in the actions layer, frame 1

stop();

tv.addEventListener(MouseEvent.CLICK, clickSection);
anim.addEventListener(MouseEvent.CLICK, clickSection);
ads.addEventListener(MouseEvent.CLICK, clickSection);
photo.addEventListener(MouseEvent.CLICK, clickSection);
film.addEventListener(MouseEvent.CLICK, clickSection);
home.addEventListener(MouseEvent.CLICK, clickSection);

function clickSection(evtObj:MouseEvent){
trace ("The "+evtObj.target.name+" button was clicked!")

gotoAndStop(evtObj.target.name);
}

I am trying to link markers on the actions time line: tv, anim, ads, photo, film and home

with layers (web pages) on the time line below...

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
LEGEND ,
Jul 20, 2010 Jul 20, 2010

Copy link to clipboard

Copied

LATEST

Enable debugging in publish settings and post entire error with line number.

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