Hey David -

You're right, I was typing too fast. Just "import". And I didn't know that
you could reference a class file without doing an import first. Thanks! It
all makes sense now.

best, - rajat

On 7/7/06, David Rorex <[EMAIL PROTECTED]> wrote:

On 7/7/06, Rajat Paharia <[EMAIL PROTECTED]> wrote:
> I recently received a project that was originally built with MTASC. The
> developer sent me a FLA that had this one line of script in Frame 1 of
the
> main timeline
> Game_main.main( _root );
>
> When I compile in the Flash IDE it all works. Not being familiar with
MTASC,
> and not seeing any #import statements anywhere, I'm confused as to how
the
> FLA knows where all the code is? Just curious.
>
> thanks, - rajat


1. There is no such thing as #import, either you mean #include, which is
generally only used in AS1, or import, which is used in AS2.
2. import in AS2 is not required. It does nothing, besides letting you
type
fewer things. For example, instead of doing:
   var x = new blah.blah.BlahClass();
you could do:
   import blah.blah.BlahClass;
   var x = new BlahClass()
both compile to exactly the same swf. notice how in the first case, there
is
now import statement, yet it can still find the class.
By default, it first looks in the same dir as the FLA, then the global
class
dir, then any other class dirs you have defined (either through flash
preferences, or through publish settings).

-David R
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
Rajat Paharia
[EMAIL PROTECTED]
http://www.bunchball.com
http://www.rootburn.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to