Re: [Flashcoders] import statement and accessing a class in AS3

2006-07-15 Thread Fumio Nonaka

Thank you, Geoffrey.

I referred the ActionScript 3.0 Language Reference and understood the
difference of 'import' directive between 3.0 and 2.0.

Also, I saw "Adobe Flash 9 Public Alpha/Configration/ActionScript 
3.0/implicitImports.xml", in which classes are defined to be imported 
implicitly into Flash IDE.  The following packages are imported:


 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
_
Geoffrey Williams wrote:

You must always import your classes in external AS files.

In Flash, the flash.* sub packages are automatically imported.


Thank you,

Fumio Nonaka
Phone: +81-42-397-9452
Fax: +81-42-397-9452
mailto:[EMAIL PROTECTED]
http://www.FumioNonaka.com/
My books
Flash community

___
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


RE: [Flashcoders] import statement and accessing a class in AS3

2006-07-14 Thread Geoffrey Williams
You must always import your classes in external AS files.

In Flash, the flash.* sub packages are automatically imported.

This is working as intended.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Fumio Nonaka
Sent: Thursday, July 13, 2006 1:50 PM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] import statement and accessing a class in AS3

In ActionScript 3.0, a class can be accessed just by the name of the
class without the import statement in a timeline.

// timeline: _level0
// frame action (ActionScript 3.0)
// import flash.display.MovieClip;
trace(MovieClip);  // output: [class MovieClip]

On the other hand, a class cannot be accessed by its fully qualified
class name in a class definition.

// ActionScript 3.0 class definition file: Test.as
package {
// import flash.display.MovieClip
public class Test {
function Test() {
trace(flash.display.MovieClip);  // ReferenceError
}
}
}

Are the behaviors above the specification of ActionScript 3.0?

Thank you




___
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


Re: [Flashcoders] import statement and accessing a class in AS3

2006-07-14 Thread simon

Hej, jag är på semester (tillbaka igen 14/8), jag nås på 070-9949770

Hälsningar
/Simon
___
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