I am converting an MXML component that extends textinput to a AS3 Component
Class that extends the TextInput. In the MXML version I am setting the
properties right in the MXML tags like so:

<?xml version="1.0" encoding="utf-8"?>
<mx:TextInput xmlns:mx="http://www.adobe.com/2006/mxml";
    editable="false"
    borderStyle="none"
    text="1 day 23 hours 59 minutes 59 seconds"
    backgroundAlpha="0"
    initialize="init()"
    creationComplete="created()">

How and where would I set the default values in my AS3 class? For example,
"editable" and "borderStyle"?


    public class Countdown extends TextInput {

        // set new default values
        //public var editable:Boolean = false; //throws errors
        public var borderStyle:String = "none"; //doesn't apply
        //public var text:String = "1 day 23 hours 59 minutes 59 seconds";
// throws error
        public var backgroundAlpha:Number = 0; //doesn't apply

        public function Countdown():void {
            //TODO: implement function
            super();
        }
    }

Reply via email to