1 Reply Latest reply on Aug 23, 2006 2:26 PM by noisyJerm

    Accessibility and onPress

      I am developing a basic drag and drop activity in Flash 8 and am attempting to make it accessibile. I have run into a problem where the screen reader won't read the text or the _accProps for a textfield whose parent movie clip has onPress handler applied to it (the object being dragged).

      The textfield has HTML set to true and displays imported XML. It seems that dynamic textfields don't receive focus so i have set the type to input, which works fine. Some how applying a stylesheet prevents it from being editable so it behaves like a dynamic field anyway.

      I have tested it in MS Internet Explorer using the demo version of Window Eyes.

      Does any one have any info on why this happens and how to get it to work? Thanks.
        • 1. Re: Accessibility and onPress
          noisyJerm Level 1
          A solution - I found a work around after posting to the forum. Use a mouseListener with an onMouseDown event function and a hitTest on the movie clip to be dragged. Eg

          /***** An accessible alternative to using movieClip.onPress for dragable movie clips *****/
          var mouseListener:Object = new Object();
          mouseListener.onMouseDown = function() {
          if (drag_mov.hitTest(_root._xmouse, _root._ymouse, true) and drag_mov.enabled){
          drag_mov.startDrag(false, 0, 0, 200, 200)
          mouseListener.onMouseUp = function() {
          if (drag_mov.hitTest(_root._xmouse, _root._ymouse, true) and drag_mov.enabled ){
          drag_mov.enabled = false;
          /***** end of code *****/

          Depending on how you write your code for the dragged movie clip, you may need a couple of extra traps like testing if the drag moive clip has been dropped ( I used the movieClip.enabled property) to prevent unwanted behaviour. I hope this helps someone. :-)