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
_______________________________________________
[email protected]
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