Skip navigation
richyboytbn
Currently Being Moderated

error: 1026: Constructor functions must be instance methods.

Jul 18, 2010 5:29 PM

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");
}

 
Replies
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 18, 2010 7:05 PM   in reply to richyboytbn

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


     
    |
    Mark as:
  • Currently Being Moderated
    Jul 18, 2010 9:09 PM   in reply to richyboytbn

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2010 3:37 PM   in reply to richyboytbn

    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.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2010 4:44 PM   in reply to richyboytbn

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

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points