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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:56:07+00:00 2026-06-07T03:56:07+00:00

Say just for fun I want to override Array and redefine map : public

  • 0

Say just for fun I want to override Array and redefine map:

public dynamic class MagicArray extends Array {
  public override function map(f:Function, thisObject:* = null):Array {
    var result:Array = [];

    for (var i:int = 0; i < this.length; i++) {
      result.push(f(this[i]));
    }

    return result;
  }
}

We get this error: Method marked override must override another method.

Huh?

So I stripped the override keyword and tried again. Now, everything compiles fine. But if we try to use it:

var a:MagicArray = new MagicArray([1,2,3]);
a.map(function(x) { return x + 1; }); 

We get the following error:

Error: Ambiguous reference to map.

So what’s going on here? How can I override map?

  • 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-07T03:56:08+00:00Added an answer on June 7, 2026 at 3:56 am

    Did you make the extension dynamic and are you using the namespace see here http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b8d829-7fde.html

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

Sidebar

Related Questions

Say you just want to get rid of the changes you've made to one
Before starting let me say: It's not homework, just plain, old, fun. Now, I'm
I want to create a class lets say called enemy 1, enemy 2, and
When a piece of code is commented we say just that, it's commented out.
Thats it really.. I am using VS2008 Express. All the samples say just to
Say I just found a bug involving javascript workflow in a web app. Most
Lets just say that I have three textboxes: TextBox1, TextBox2, TextBox3. Normally if I
Let's just say that I need to render a certain amount of HTML over
Just starting to study the Azure framework. Just say you create a row in
I know it will sound dumb or people will just say: read the documentations

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.