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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:39:48+00:00 2026-05-25T10:39:48+00:00

I’ve been programming in ActionScript for a while now even though I barely understand

  • 0

I’ve been programming in ActionScript for a while now even though I barely understand how extending classes exactly work. Most of my projects have been one-file scripts so you can probably imagine trying to work with a 1000+ line file (that’s probably too little for some of you :P).

Trying to look through numerous online tutorials have been daunting and or confusing at most, and don’t explain how extending actually works. Finding one that describes each essential keyword needed would be nice.

In past projects, I’ve managed to use two scripts, though not technically extending a class (I believe). For example:

Main.as (Main file)

package {

    import flash.display.Sprite;

    public class Main extends Sprite {

        public function Main () {
            trace(GLOBAL.version); // "1.0"
        }

    }

}

GLOBAL.as (a helper script in the same directory):

package {

    public class GLOBAL {

        public static var version:String = "1.0";

    }

}

It appears that even though I hadn’t specifically imported the GLOBAL.as file, it’s still accessible.

What I’m asking from the SO community is: How can I better understand how extending a class works, using files in the same directory and another directory, Use the Main file as a simple “includer” and other files as helpers, such as adding a Sprite to the stage. Hopefully I’m not making this more difficult than it is. But for some reason I just can’t “get it”.

Other note: I’ve been working with JavaScript a lot more than I have ActionScript, so any guru’s out there wanting to give a tutorial on going from JavaScript to ActionScript would be a plus!

  • 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-25T10:39:49+00:00Added an answer on May 25, 2026 at 10:39 am

    Id suggest looking at some object oriented tutorials in general. Ill give you my view of three elements of object orientation. Classes, extending and objects.

    An object is an instance of something. An example of this could be two seperate people using the same system on two seperate computers. They are two seperate objects which are often referred to as instantiation. An object instantiates a class.

    A class defines an object and provides ita functionality. An example of a class could be a database class for example which stores all of the connection details. The database class would need to be instantiated by the object in order to fullfill the requirements of the system, e.g. Insert a car make into the database.

    Extending a class (more commonly known as class inheritance) actually inherits all of the functionality off the parent class. An example of this could be the database class (which i mentioned earlier) inheriting logic from a users table perhaps? When developing iPhone apps you often inherit specific framework functionality and ammend where necessary to make a bespoke system…

    Hope this helps in some way.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small

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.