WORKAROUND NEEDED for a focus issue
hi,
i've incurred severe bug makes flash components useless need bit of control on focus management.
considered following situation: have:
- button instance named mybutton, focusenabled=false
- input textfield named mytextfield
- many other display objects like, capable of receiving focusa
- actions purposefully set stage.focus=null no object has focus
- file object named myfile
the problem following: mybutton has listener registered mouseevent.click (note has focusenabled=false, clicking on _not_ give focus), calls myfile.browseforsave.
now, if stage.focus null when button clicked, after file-selection popup window has been closed (either selecting file or clicking cancel), focus restored last non-null object had had it, if focus null when button clicked.
that is, example:
- click on mytextfield give focus
- triggers method does: stage.focus=null
- stage.focus null
- click mybutton. not change focus (ok), , opens dialog browsing file
- select file or cancel
- mytextfield has focus!!!!!!!!!!!!
now, writing here because have tried obvious workaround of adding line of code listeners associated select and/or cancel events after closing browsing dialog focus assigned null again.
but not work, guess because buggy assignment restore focus arbitrary value happens _after_ listeners.
so have no workaround issue , whole application rendered useless unless find workaround amazing bug.
i have reported bug, take years before adobe fixes , need workaround now. without workaround, can quit developing applications flash , platform, component framework useless if such issue cannot avoided.
does have idea how work around issue?
i'll attach example fla file illustrate problem (if find out how attach file).
i _guess_ (this guess) problem may in actionscript code of actionscript 3.0 components ship flash. source code of components installed flash , can changed, think.
i happy solution involve cracking buggy component code, if that's way....
thanks in advance
m.
More discussions in ActionScript 3
adobe
Comments
Post a Comment