jeudi 17 novembre 2016

Actionscript - Referring to TextFields Without The Use of 'var'

I have the problem in ActionScript 3 where I have to dynamically create a TextField, but then later refer to it, however this reference isn't working and all other examples I found online use 'var' to refer to the TextField. How do you properly set the testBoxState variable to the wanted TextField in this situation?

var testBoxState:TextField = new TextField();

testBoxState = stage.getChildByName("stateField" + testProperties) as TextField;

Aucun commentaire:

Enregistrer un commentaire