开发者

Flash Error #1010

开发者 https://www.devze.com 2022-12-25 05:14 出处:网络
when i run my flash file (test it) in the output panel i get the following error TypeError: Error #1010: A term is undefined and has no properties.

when i run my flash file (test it) in the output panel i get the following error

TypeError: Error #1010: A term is undefined and has no properties.

i read some where, that this was caused because one of t开发者_如何学编程he variables is set to null. after looking at my code i found out that the following line was causing this output

arrSelectedIndex[i] = -1;

this is later on used as the selected index in a group of radio buttons.

my question is, would having the selected index set to -1 be an issue ?

thanks


The RadioButtonGroup takes a selectedValue property, not a selectedIndex. So you can't set the selectedIndex of an RBG to anything at all, not just not -1.

You can retrieve the value of a radioButton in a RadioButtonGroup by using the method RadioButtonGroup.getRadioButtonAt(index:int).


Sounds like arrSelectedIndex is null on this line. Trace back to where it is supposed to be assigned. Use the debugger if trace statements aren't enough to figure out what's wrong.

0

精彩评论

暂无评论...
验证码 换一张
取 消