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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:49:32+00:00 2026-05-12T15:49:32+00:00

How can I make an abstract class in AS3 nicely? I’ve tried this: public

  • 0

How can I make an abstract class in AS3 nicely?

I’ve tried this:

public class AnAbstractClass
{
    public function toBeImplemented():void
    {
        throw new NotImplementedError(); // I've created this error
    }
}

public class AnConcreteClass extends AnAbstractClass
{
    override public function toBeImplemented():void
    {
        // implementation...
    }
}

But.. I don’t like this way. And doesn’t have compile time errors.

  • 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-12T15:49:32+00:00Added an answer on May 12, 2026 at 3:49 pm

    abstract classes are not supported by actionscript 3. see http://joshblog.net/2007/08/19/enforcing-abstract-classes-at-runtime-in-actionscript-3/

    the above reference also provides a kind of hackish workaround to create abstract classes in as3.

    Edit
    also see http://www.kirupa.com/forum/showpost.php?s=a765fcf791afe46c5cf4c26509925cf7&p=1892533&postcount=70

    Edit 2 (In response to comment)

    Unfortunately, you’re stuck with the runtime error. One alternative would be to have a protected constructor…. except as3 doesn’t allow that either. See http://www.berniecode.com/blog/2007/11/28/proper-private-constructors-for-actionscript-30/ and http://gorillajawn.com/wordpress/2007/05/21/actionscript-3-%E2%80%93-no-private-constructor/.

    You may Also find these useful: http://www.as3dp.com/category/abstract-classes/ and, in particular, http://www.as3dp.com/2009/04/07/design-pattern-principles-for-actionscript-30-the-dependency-inversion-principle/

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

Sidebar

Related Questions

I can't make this scenario work. Here's the pattern- [DataContract] /*abstract*/ class BaseT {
In C++, you can do the following: class base_class { public: virtual void do_something()
Consider this abstract class public abstract class Foo { public Injectable Prop {get;set;} }
Consider this: public static abstract class JunkValue<X>{ public abstract X value(); public static <X>
I have a field in base abstract class. I want to make this field
I've got this setup in my code: public abstract class ModelBase{} public interface IModelbase<T>{}
I hope this is a simple question. Can I inherit both an abstract class
I can make abstract class equivalent to interface by putting all abstract methods within
I can make batch or vbs file on windows and run. this can automate
I'm trying to generate top-level abstract class with JCodeModel library, but I can't find

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.