Colin Moock's book says it's because of adherence to ECMAScript 4, and
points to this page for explanation:
http://kuwamoto.org/2006/04/05/as3-on-the-lack-of-private-and-protected-constructors
Helen
Francis Cheng wrote:
I'm guessing that the odd reason has something to do with the behavior
of the "private" attribute in AS2 versus AS3. As most of you are aware,
the "private" attribute in AS2 only restricts access at compile time. In
AS3, however, "private" restricts access at both compile time and
runtime. Just a guess, though, I could be barking up the wrong tree.
Francis
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Muzak
Sent: Thursday, July 12, 2007 5:21 PM
To: [email protected]
Subject: Re: [Flashcoders] Accessing MovieClips on a timeline from an
AS3 class
This means that you either have to declare the variables yourself (and
they have to be public, by the way)
or declare the class as dynamic so that the variables can be added at
runtime (specifically, at the time the
assignment statements are executed).
I think the "has to be public" thing is one of the most annoying things
that has changed between AS2 and AS3.
In AS2 you can place assets on stage and declare them as private in your
class.
In AS3 this is not allowed/possible for some odd reason.
regards,
Muzak
_______________________________________________
[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