  | |  | AS2 private methods/properties in extended classes | AS2 private methods/properties in extended classes
2004-02-17 - By arzach
Back right now i 'm getting a bit confused with the usage of private. i 'm
building a component like a window, and i can pass values to private
vars using an object during the attachMovie. So, private var seems to be
Private just if you try to reach them in an instance of the class. So
private doesn 't means that you can 't read or change them at all.
Emile Swain wrote:
>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:104454
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |