A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [RESOLVED] Stage.focus vs. JAWS

  1. #1
    Member
    Join Date
    Feb 2001
    Posts
    56

    resolved [RESOLVED] Stage.focus vs. JAWS

    When using Stage.focus - I have dynamic textfields disappearing after the focus has moved off of them.

    I'm trying to get JAWs to jump to a certain text field after the user either keys the answer/or presses the spacebar(Jaws control) and answers a question. Best way I've figured out how to do this to move the stage.focus when the system gets an answer to the next text that I want JAWs to read.

    The focus changes and JAWS reads it like it's there, but it's no longer visually there on the screen. This happens with both TextFields that I'm switching between after the first switch. AS Trace statements and JAWS both say the textfields are still there.

    Has anyone seen this behavior with stage.focus?

    Thanks in advance.

    -<>|TheMadFlasher|<>-

  2. #2
    Senior Member
    Join Date
    May 2004
    Posts
    226
    Have you tried forcing FocusEvent.FOCUS_OUT to fire before removing the textField?

    textField.stage.focus = null; //FocusEvent.FOCUS_OUT dispatched
    textField.parent.removeChild( textField );

  3. #3
    Member
    Join Date
    Feb 2001
    Posts
    56
    Actually - I want the textfield - I'm not trying to remove it. I think I made a mistake in mentioning the "focus moving off" because looking back it's when the focus is set to the TF, sorry for the confusion.

    It might help if I take JAWS out of the equation, and give the steps of what's happening. Here's the steps-
    • First stage.focus fires - TF1 still there
    • 2nd stage.focus on TF2 fires - it disappears
    • 3rd stage.focus fires back on TF1 - then it disappears

    I should note that both TFs are dynamically/custom css/embedded fonts in FP9 and at 1 level off the stage, and other is 3 levels off the stage. I did a test and found that if both TF's are on the stage level in the display list - this doesn't happen. The documentation for stage.focus doesn't really mention any issues with the object's location in the display list.

    -><|TheMadFlasher|><-

  4. #4
    Member
    Join Date
    Feb 2001
    Posts
    56

    resolved

    I've resolved this issue.
    The issue was with the Embedded Fonts/TextFormat vs Stage.focus.

    Seemed that every time the stage.focus was applied to embedded/CSS formatted text field the defaultTextFormat ... as best as I can describe... reverted to a default. When the reversion and actual style clashed, Flash Player 9 decided it was best to show nothing.

    I ended up storing my original assigned defaultTextFormat object in class with the textfield and reassigning it before the focus was applied to the TextField. That, while not ideal, fixed it.

    JAWS notes for those interested -
    stage.focus does work to change the screen reader to a Textfield that you want it to read. However, there can be timing lags. In my case it was because after the user pressed/interacted - it read what they pressed - and that's when my focus fired... I set a timer delay on the focus command and it fixed the problem.

    -<>|TheMadFlasher|<>-

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center