ah ok. I set up a test where I added accessibility properties to the
sprite. Doesn't invoke the keyboard in metro :(

I've also traced out  Accessibility.active onto a textfield in metro and it
returns false.

Here's the added code:

private function init():void
{
drawSprite(); // Does not invoke Metro soft Keyboard
 drawSpriteWithEventHandler(); // Does not invoke Metro soft Keyboard
drawTextField(); // Does not invoke Metro soft Keyboard
 drawInputTextField(); // successfully invokes Metro soft Keyboard
 setTimeout(updateAccessibility, 2000);
 }
 private function updateAccessibility():void {
 console.text += "Accessibility.active: " + Accessibility.active+'\n';
if(Accessibility.active) {
 Accessibility.updateProperties();
}
}

private function drawSpriteWithEventHandler():void
{
textInputEH = new Sprite();
 textInputEH.x  = 100;
textInputEH.y = 200;
var g:Graphics = textInputEH.graphics;
 g.beginFill(0x22ff00, 1);
g.drawRect(0,0,200,80);
g.endFill();
 addChild(textInputEH);
textInputEH.buttonMode = true;
textInputEH.addEventListener(MouseEvent.CLICK, function
(event:MouseEvent):void
 {
console.text += event.currentTarget+'\n';
} );
 addEventListener(Event.ADDED, addedHandler);
var accessProps:AccessibilityProperties = new AccessibilityProperties();
 accessibilityProperties = accessProps;
}
 private function addedHandler(event:Event):void {
console.text += "addedHandler: " + name+'\n';
 var accessProps:AccessibilityProperties = new AccessibilityProperties();
accessProps.name = 'spriteWithAccessability';
 accessProps.description = 'textbox';
textInputEH.accessibilityProperties = accessProps;
 removeEventListener(Event.ADDED, addedHandler);
}



On 20 September 2012 23:26, Alex Harui <aha...@adobe.com> wrote:

> **
>
>
> I was more interested if you could get the Sprite to display the keyboard
> by adding accessibility properties to it.
>
>
>
> On 9/20/12 2:45 AM, "Wouter Schreuders" <wschreud...@gmail.com> wrote:
>
>
>
>
>
>
> Hi Alex
>
> Yep, focus definitely does go to the sprite and the stage's focus is set.
> I also outputted all the events that the textinput received (I've excluded
> some overly chatty ones like enterframe) Accessibly is enabled for the
> project and I've added the following to the MXML textInput which seem to no
> difference:
>
> accessibilityEnabled="true" accessibilityName="textbox"
> accessibilityDescription="textbox"
>
> when I have a universal event listerner I get these events in both
> displayAsPassword enabled and disabled textInputs:
>
> preinitialize
> initialize
> resize
> creationComplete
> activate
> touchBegin
> touchRollOver
> touchOver
> removed
> focusIn
> touchMove
> removed
> touchMove
> touchEnd
> touchTap
> touchOut
> touchRollOut
> click
>
>
>
>
> On 19 September 2012 19:44, Alex Harui <aha...@adobe.com> wrote:
>
> stage.focus
>
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe Systems, Inc.
> http://blogs.adobe.com/aharui
>
>  
>

Reply via email to