actionscript 3 - AS3 - Overriding a class setter that doesn't exist? -
i'm following tutorial oop , setters/getters , overrides in as3.
in tutorial, have created class extends
sprite
act button contains shape
, textfield
.
the tutorial author demonstrates if use height
property of class (inherited way displayobject
so:
button.height = 100;
then not shape
of button scaled up, textfield
, font in scaled larger. author doesn't want this, wants shape
scaled up, while leaving font size way is. in following way:
override public function set height(h:number):void { // custom code here. }
this making me confused, because having looked closely @ adobe's as3 api reference, cannot see method
sets displayobject
's height. can see property
height
.
before getting override
author explain setters , getters
, understand concept. however, cannot understand how can override
setter
doesn't seem exist?
have assumed able override anything has there in first place.
if explain technique grateful, or maybe point me more reading on this.
a property not public variable. in fact, displayobject
's height
property has both setter , getter function, setter exists , can overridden.
Comments
Post a Comment