I’ve just discovered a bug in my app, it looks like a Flash player bug, i would like to know if anyone has found a workaround or something.
I’ve some radio buttons groups in my app. If I press the arrow keys while holding the spacebar pressed, it ends up triggering
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.controls::LabelButton/drawIcon()
at fl.controls::LabelButton/draw()
at fl.controls::RadioButton/draw()
at fl.core::UIComponent/callLaterDispatcher()
If found this thread that describes my same situation.
Do you think there’s any workaround for this? Is it really a flash bug?
So, I’ve investigated this problem and found, that there is an error in standard fl components. It is not only about RadioButton. If you hold SpaceBar and then switch current UI element by clicking “TAB” button – you will receive similar error.
To solve it, you should fix source of the component: in class
LabelButton, methodkeyUpHandlerreplace codewith
and add override:
If you don’t know, how you can do it:
just copy
Adobe Flash CS5 install folder\Common\Configuration\Component Source\ActionScript 3.0\User Interface\fl\controls\LabelButton.asto another directory with the same package structure\fl\controls\LabelButton.asthen you need include this duplicated structure to project.
It is not very good way, but in this case it really fixes this error. BTW, I’ll send it to Adobe.