Jump to content
Search Community

Newbie Qs

emptypixels test
Moderator Tag

Recommended Posts

This has nothing to do with the above, but still it´s a noob question, so i´ll post it here :)


I work on a project with several classes, in all of which i use TweenLite. Since all of the classes get compiled into one swf, do i have to import TweenLite in every

single class, and will this increase filesize? I don´t know if i make myself clear... What i mean is, would it be enough to import TweenLite only once in the

document class?

Link to comment
Share on other sites

You'd be surprised how many people wonder the same thing. The answer is:


1) Yes, you must import it in every class where it's referenced


2) NO, importing it multiple times (in various classes or on various frames) does NOT increase the file size exponentially. Flash is smart enough to only embed the code ONCE. The import statements are like "pointers" that tell Flash which class you're talking about when you type "TweenLite". Import it as many times as you want - it will only embed it once.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...