For example in the following:

import flash.display.*;

var mySprite:Sprite = new Sprite();

Does that means that only the Sprite class will be added or will all the
classes under display will still be added?

Only what you *use* will be added. "import" doesn't include anything, it merely states you might or might not use that package (or class definition), so it'll now where to look in case you do so.

So in your case, yeah, only "Sprite" would be added. *If* it was a normal class or some custom class under AS2. Because in this specific example, if you're referring to AS3, nothing will actually be added; Sprite is an intrinsic class, importing it merely works as typing and as a definition for compilation (the "class" is already in the player so it's not "added" to the SWF).


//Another basic question... could some one point me to a resource to
understand the difference between
var mySprite:Sprite = new Sprite;
and
//notice the end ()
var mySprite:Sprite = new Sprite();
I tried to google it but didnt know exactly how to find it..

The first one is slightly uncommon, but both do the same thing.


Zeh
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to