Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 980475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:23:14+00:00 2026-05-16T04:23:14+00:00

My code looks like : private function createExportButton() : void { var exportButton :

  • 0

My code looks like :

private function createExportButton() : void {
        var exportButton : Button = new Button();
        exportButton.label = "Export";
        exportButton.x = 600;
        exportButton.y = 10;
        exportButton.addEventListener(MouseEvent.CLICK, function
                                           clickHandler(e : MouseEvent) : void {
            this.export();
        });
        super.addElement(exportButton);
    }

The error is:

*
TypeError: Error #1006: export is not a function. at Function/()[C:\Users\User\Adobe Flash Builder 4\agriculturalAdministration\src\certificate\one\CertificateBuilder1.as:150]
*
Can anyone explain me why this?
Thanks advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:23:14+00:00Added an answer on May 16, 2026 at 4:23 am

    clickHandler() is not a member function, it does not belong to any class. It is an anonymous function. Therefore, it does not belong to an instance.

    However, if I recall correctly, you should be able to refer to variables in the enclosing scope (such as exportButton) from within. In that case, you may want to assign the class reference to a variable and use that instead of this:

    var exportButton:Button = new Button();
    var this_:SomeClass = this;
    ...
    addEventListener(..., function clickHandler(e:MouseEvent):void {
        this_.export();
    });
    

    Or, you can just make clickHandler() a member function:

    private function clickHandler(e:MouseEvent):void
    {
        this.export();
    }
    
    ...
    {
        addEventListener(..., clickHandler);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code looks like below: private void LayoutRoot_Loaded(object sender, System.Windows.RoutedEventArgs e) { // TODO:
I have code which looks like: private static DirectiveNode CreateInstance(Type nodeType, DirectiveInfo info) {
My code currently looks like this: private Foo myFoo; public Foo CurrentFoo { get
My code looks like follows var html = $(el).html().toString(); html = '2012-05-10'; var re
My code looks like this : Vector<String> My_Vector=new Vector<String>(); String My_Array[]=new String[100]; for (int
My code looks like: Entity e = new Entity(); e.name = ...; e.blah =
Code looks like that #include <cstdlib> #include <iostream> using namespace std; #define n 3;
My code looks like <html> <head> <title>My HTML application</title> <HTA:APPLICATION id=frames border=thin caption=yes icon=http://www.google.com/favicon.ico
My code looks like this: NSIndexPath *ip = [NSIndexPath indexPathForRow:15 inSection:0]; [[self tableView] selectRowAtIndexPath:ip
here is what my code looks like i have two forms: class Form_1 extends

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.