The import statement does not create instances. It just makes a class available to another class so it can use its methods and create instances of it. You don't need an import statement if the class you want to import is in the same package as the class you are referencing it from. You can import an entire package by using the wildcard character (import mx.controls.*).
You create instances by using the new operator. When you declare an object in MXML that tag is compiled into a block of Actionscript that contains the new operator. --- In [email protected], "Scott" <[EMAIL PROTECTED]> wrote: > > The "import <class>;" is what creates the instance? So in other words, if I use the import <thisfile.mxml> in each of my other files, each one is creating another instance of the <thisfile.mxml>? > > ________________________________ > > From: [email protected] on behalf of Michael VanDaniker > Sent: Tue 7/29/2008 10:30 AM > To: [email protected] > Subject: {Disarmed} Re: {Disarmed} RE: [flexcoders] mxml components > > > > > Are these the same instance or unique instances with in each of the > > class instances themselves (mainclass/class3)? > > > > > > > > MainClass.mxml: > > > > > > > > <mx:script> > > > > <
