I’m trying to write my first custom class and I am having a few problems with it. If anyone could point out where my problems are or give a link to a good resource on learning more about custom classes that would be wonderful.
class spawnTextFields {
public function spawnTextFields(target:String,txtName:String,depth,xLoc,yLoc,setStr:String){
if(depth == null){
depth = this.getNextHighestDepth();
}
target.createTextField([txtName],[depth],0,0,0,0);
target.txtName.text = [setStr];
target.txtName.autoSize=true;
}
}
When I run that I get the following errors:
There is no method with the name ‘getNextHighestDepth’.