AS3 Methods
- Started
- Last post
- 5 Responses
- maximillion_0
extend the textfield class and you will be able to do this. search "extending classes actionscript" and you will find the answer
- bulletfactory0
www.gotoandlearn.com may have something on classes and methods
- kult0
Yeah, create a custom class for yourself. Here, I'll get ya started.. create a file called, for example, MyText.as..
package {
public class MyText extends TextField {
var theText = this;
public function trimText() {
//your code here... affecting theText
}
}
}Wrote this inside the QBN textbox so it's obviously not the best.
- StratusGD0
Thanks Max, Kult - I knew about extending Classes - not sure why that didn't click in my head. I guess I was looking for a way to do that without having to create a new Class.
Anyway, good to know the answer. Thanks.