  | |  | AS2 private methods/properties in extended classes | AS2 private methods/properties in extended classes
2004-02-17 - By Emile Swain
Back
Class mysuper extends MovieClip
{
private var member:String = "test "
}
Class mybase extends mysuper
{
function mybase (Void)
{
trace( "my member is " + member)
}
}
in my example(note I just typed this quickly so ignore errors) a private
variable member is accessible by mybase (which extends mysuper). Now is
this as it should be? I thought that private was supposed to keep
properties/methods internal to the class rather than public? Or is this
a special case for when your extending classes.
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Supported by Fig Leaf Software
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
Be sure to check the archives and the wiki:
http://chattyfig.figleaf.com/
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:104449
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |