I'm trying to be responsible with my "DOM" references in this little Flash 8/AS2 project.
What has become increasingly frustrating is obtaining references to other movie clips and objects. For example, currently my code to access the submit button of a form looks something like this
var b:Button = _level0.instance4.submitBtn;
I was hoping there was an instance-retrieval method for AS2 similar to AS3's MovieClip.getChildByName()
or even Javascript's document.getElementById()
. Because hard-coding the names of these anonymous instances (like instance4
in the above) just feel really, really dirty.
But, I can't find anything of the sort at this AS2 Reference.