> Hi Danny,
>   An import statement is just a compiler-friendly shortcut. 
> It has no effect whatsoever on the final code.
> 
> Saying:
> 
> import com.pkg.fred.Bucket;
> 
> // later
> var bucket:Bucket=new Bucket();
> 
> is identical to saying just:
> var bucket:com.pkg.fred.Bucket=new com.pkg.fred.Bucket();
> 
> That's all it is. A convent bit of syntactic sugar. It's 
> exactly the same in Java.

You know something? I actually knew that somewhere in my head, but it had
been temporarily squished. Thanks.

> As soon as you refer to the class in some way that ensures it 
> is compiled in (i.e. an import will not do, but any concrete 
> reference such as the line above will do) then that class is 
> available to any other piece of code within that same Flash 
> VM, with the following
> exception: IIRC SWFs compiled for Flash 6 and Flash 7 don't 
> share thair global namespace (so I'd imagine that you'd have 
> issues there).

Brilliant, that makes a *lot* more sense. In particular, it means I don't
have to import all my packages into every blimmin' class.

> P.S. How're the interactive storytelling things going..?

:) 

Try me again in about a year and a half. We've been head down in a lot of
tech-heavy and content-light development recently, but who knows, once this
current stuff is done we might go back to something a bit more creative...

Danny

_______________________________________________
[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

Reply via email to