> So then it is safe to do > > import flash.display.*; Only if you're not going to run into any naming conflicts.
I generally find it's better to only import the classes you're going to use, for a couple reasons. 1) It reduces the chance of naming conflicts (like two packages having Button classes in them). The only time you'll have to deal with naming conflicts here is if you actually need to use classes with the same name from two different packages. If you import the entire packages there's a higher chance of conflict. 2) It makes it much easier to tell, at a glance, what a class depends on. This can be beneficial in many cases. -Andy On Jan 15, 2008 11:52 AM, Helmut Granda <[EMAIL PROTECTED]> wrote: > > > > 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). > > > So then it is safe to do > > import flash.display.*; > > and not to worry about bundling up the SWF eh? > > > > > 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 > > > > Thanks Zeh, that is what I thought but I wasn't sure..... specially when I > instantiate my Classes there was no difference on the way I was using them, > of course unless I needed to pass some parameters. > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders