Re: [Flashcoders] Classes added

2008-01-23 Thread slangeberg
to save typing, merely hit control - enter when you start instantiating, and code completion will enter the import for you, such as: var c:DisplayOb...(ctrl-entr)... -Scott On Jan 15, 2008 3:42 PM, Merrill, Jason [EMAIL PROTECTED] wrote: 2) It makes it much easier to tell, at a glance, what a

RE: [Flashcoders] Classes added

2008-01-15 Thread Matthew James Poole
Yep we got that ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Sacks Sent: 15 January 2008 00:55 To: Flash Coders List Subject: Re: [Flashcoders] Classes added And by that I mean that it's poorly written, hehe. 14.11 New expressions A new

Re: [Flashcoders] Classes added

2008-01-15 Thread Helmut Granda
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

Re: [Flashcoders] Classes added

2008-01-15 Thread Helmut Granda
Very good point Glen... Although this seems kind of redundant if you import your classes and then use the qualified name to instantiate a specific class. But I fully understand what you mean. On 1/14/08, Glen Pike [EMAIL PROTECTED] wrote: Hi, As a quick note: The reason for specifically

Re: [Flashcoders] Classes added

2008-01-15 Thread Helmut Granda
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Juan Pablo Califano Sent: Monday, January 14, 2008 3:11 PM To: Flash Coders List Subject: Re: [Flashcoders] Classes added ... If I'm not mistaken, these are equivalent. var mySprite:Sprite = new Sprite(); var mySprite:Sprite = new

Re: [Flashcoders] Classes added

2008-01-15 Thread Andy Herrman
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

RE: [Flashcoders] Classes added

2008-01-15 Thread Merrill, Jason
2) It makes it much easier to tell, at a glance, what a class depends on. This can be beneficial in many cases. That's the main reason I do it, I like to see all dependancies, for my own benefit and for others who will come after me. package.* always seemed like a cop-out to me, even if it

Re: [Flashcoders] Classes added

2008-01-14 Thread Juan Pablo Califano
Hi, helmut, only the referenced classed will make it to the swf bytecode. So, if you have: import somePackage.ClassA; import somePackage.ClassB; private var _objectA:ClassA; Only the ClassA will be compiled. Of course, if you call the constructor, it'll be compiled as well. That's a

Re: [Flashcoders] Classes added

2008-01-14 Thread Zeh Fernando
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

RE: [Flashcoders] Classes added

2008-01-14 Thread Dwayne Neckles
Does that means that only the Sprite class will be added or will all the classes under display will still be added? All classes under display will be added if you wrote import flash.display.Sprite; then only the Sprite class would be imported.. Another basic question... could some one

Re: [Flashcoders] Classes added

2008-01-14 Thread Steven Sacks
Francis Cheng wrote: See the money quote in the last line of the paragraph: 14.11 New expressions A new expression results in the invocation of the intrinsic construct method of the value computed by the expression that follows the new keyword. Arguments, if specified, are passed to the

RE: [Flashcoders] Classes added

2008-01-14 Thread Francis Cheng
- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Juan Pablo Califano Sent: Monday, January 14, 2008 3:11 PM To: Flash Coders List Subject: Re: [Flashcoders] Classes added ... If I'm not mistaken, these are equivalent. var mySprite:Sprite = new Sprite(); var mySprite:Sprite

Re: [Flashcoders] Classes added

2008-01-14 Thread Glen Pike
Hi, As a quick note: The reason for specifically listing all the classes you actually use, rather than having wildcards means that you won't get clashes between the same classnames that may appear in different packages, e.g. //Button class in here import mx.controls.*; //Button in here too

Re: [Flashcoders] Classes added

2008-01-14 Thread Steven Sacks
And by that I mean that it's poorly written, hehe. 14.11 New expressions A new expression results in the invocation of the intrinsic construct method of the value computed by the expression that follows the new keyword. Arguments, if specified, are passed to the construct method. If no