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

  • Home
  • SEARCH
  • 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 317581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:29:26+00:00 2026-05-12T08:29:26+00:00

In Actionscript 3, is there any reel overhead between importing a full package versus

  • 0

In Actionscript 3, is there any reel overhead between importing a full package versus importing independant classes?

E.g.: import flash.display.* vs. import flash.display.Sprite

I know it’s a good practice to import only the needed classes from a package to avoid conflicts, but I’ve often been told it also has a cost in term of the compiled file size if I import full packages in many different classes that only use some of the classes from those packages.

I wonder if one class will be imported once for all for the whole project, or if imports are multiplied among the classes that use them.

Resulting compiled file size and runtime performance are two different aspects this question embraces.

  • 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-12T08:29:27+00:00Added an answer on May 12, 2026 at 8:29 am

    The only hit should be compile time, but rday writes that there is apperently a small hit. But that should be something that Adobe will fix in the future.

    The import statements should not really be looked on as actual imports, it is merely a way for the compiler to know which classes you are refering to.

    eg. If you made you own Point class and it was being used in another package, the compiler needs to know if you are refering to your own Point class or the Adobe Point class.

    The alternative would be to write the fully qualified name evertime you refered to a class.

    eg. var mySprite:flash.display.Sprite = new flash.display.Sprite();

    As pointed out by Juan Pablo Califano in the comment, this does not actually work with the compiler (though I think it might work with AS2). I merely meant to point out why we have import statement to begin with.

    In any case it should not effect the compiled file if you import a whole package (though it apperently does). It will how ever effect compile time, since you are giving the compiler more stuff it needs to look through.

    As for “importing” the same class more than once. It will not make a difference. The compiler will only include the same class once. Else the compiled file size would quickly spin out of control, since most classes refer to many classes which again refer to others etc. But again, Adobe might have optimizing to do there.

    Bottom line is you should only import the stuff you need, there is no real advantage to importing a whole package. Just use a proper coding tool like FlashDevelop (it is free) and you do not even have to write the import statements yourself.

    On a side note, if you are compiling a library (where a class not refered to are also included), im not sure if importing a external package might include that in you compiled file. That might have an actual impact; though hopefully Adobe did not screw up there 😉

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

Sidebar

Ask A Question

Stats

  • Questions 207k
  • Answers 208k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Maybe it was already visited. Try this: .test a:link, .test… May 12, 2026 at 9:28 pm
  • Editorial Team
    Editorial Team added an answer Best what you can do is to use non breaking… May 12, 2026 at 9:28 pm
  • Editorial Team
    Editorial Team added an answer Have you considered using a BindingSource, or creating your own… May 12, 2026 at 9:28 pm

Related Questions

In ActionScript 3, is there any convenient way of determining if an associative array
Is there any way to create foldable regions of code in ActionScript 3 (read
Im trying to find some way (in actionscript 3) to output info for the
Is there any way to detect memory leaks in Flash ActionScript-3 project? what are

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.