  | |  | overiding _height getter/setter | overiding _height getter/setter
2004-02-16 - By Guillermo Torres
Back Hi everyone,
I have a class that extends the Movieclip class but the height I get from
this._height is not the one I want instead I would like to override this
with my one getter/setter functions. Does anyone have any idea on how to
make something like this work?
class Test extends MovieClip {
//PROPERTIES
private var margin:Number = 10;
private var currentHeight:Number = 50;
private var active:Number = -1;
function get _height():Number {
trace( "getting _height ");
return currentHeight + margin;
}
function set _height(h:Number) {
currentHeight = h;
}
function Test (){
trace(this._height);
}
}
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
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:104354
=-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
To unsubscribe send a blank e-mail to:
Normal Mode: flashcoders-unsubscribe@(protected)
Digest Mode: flashcoders-digest-unsubscrive@(protected)
|
|
 |