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 8880213
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:07:27+00:00 2026-06-14T20:07:27+00:00

I have a strange situation where I can’t see why the IEventDispatcher interface that

  • 0

I have a strange situation where I can’t see why the IEventDispatcher interface that I have implemented is not compiling and I’m getting Error: Call to a possibly undefined method addEventListener and Error: Call to a possibly undefined method removeEventListener.

There’s a good chance I’m doing something incredibly dumb here I just don’t know what it is…

Here are the methods in the Class that are throwing these errors (meaning the methods working on “view” in the body of the setTransformListner and “removeTransformListener”:

public function setTransformListener(view:AbstractView):void
{
    view.addEventListener(CustomEvent.TRANSFORM, transform);
}

public function removeTransformListener(view:AbstractView):void
{
    view.removeEventListener(CustomEvent.TRANSFORM, transform);
}

private function transform(e:CustomEvent):void
{

}

Here is the Event Dispatcher Class…

package view 
{
    import flash.events.Event;
    import flash.events.EventDispatcher;
    import flash.events.IEventDispatcher;

    public class AbstractView implements IEventDispatcher
    {

        private var _dispatcher:EventDispatcher;

        public function AbstractView():void
        {
            _dispatcher = new EventDispatcher(this);
        }

        /* INTERFACE flash.events.IEventDispatcher */

        public function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
        {
            _dispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference);
        }

        public function dispatchEvent(evt:Event):Boolean
        {
            return _dispatcher.dispatchEvent(evt);
        }

        public function hasEventListener(type:String):Boolean
        {
            return _dispatcher.hasEventListener(type);
        }

        public function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
        {
            _dispatcher.removeEventListener(type, listener, useCapture);
        }

        public function willTrigger(type:String):Boolean 
        {
            return _dispatcher.willTrigger(type);
        }

    }

}
  • 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-06-14T20:07:28+00:00Added an answer on June 14, 2026 at 8:07 pm

    Wild guess, you package name is view and you are trying to call view.addEventListener, try changing the package name. Although the local var view should be used first.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very strange situation and I really can't see why ... and how
I have strange situation - when I'm trying to update model, that can contains
I have strange error and not sure how to tackle it without wasting too
I have a strange situation where I can build a project with ant without
i have a strange situation. please see the backgroundWorker5_RunWorkerCompleted event: private void backgroundWorker5_RunWorkerCompleted(object sender,
Trying my hand with jQuery. I have this strange situation that i wish to
I have a strange problem where MonoTouch seems to be either not compiling methods
I have a strange situation which I hope someone can shed some light on.
I am running into a very strange situation with an app I have that
I have a strange situation in regards to xml serialization... If I run MyApp.exe

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.