StageText not firing SoftKeyboardEvents
I've already filed a bug (3610876) about this but I'm looking for a workaround as I haven't found any.
Basically StageText seems to not listen to SoftKeyboardEvent.ACTIVATE and SoftKeyboardEvent.DEACTIVATE. It is, however, listening to SoftKeyboardEvent.ACTIVATING.
Here's a sample code that reproduces the problem.
package
{
import flash.display.Sprite;
import flash.events.SoftKeyboardEvent;
import flash.geom.Rectangle;
import flash.text.StageText;
[SWF(width='1024',height='768',backgroundColor='#ffffff',frameRate='25')]
public class SimpleStageText extends Sprite
{
private var myText:StageText;
public function SimpleStageText()
{
super();
myText = new StageText();
start();
}
protected function start():void
{
myText.stage = this.stage;
myText.viewPort = new Rectangle(5,300,100,20);
myText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATING,onKeyboardActivating);
myText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE,onKeyboardActivate);
myText.addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, onKeyboardDeactivate);
}
protected function onKeyboardActivating(event:SoftKeyboardEvent):void
{
trace("SoftKeyboardActivating");
}
protected function onKeyboardActivate(event:SoftKeyboardEvent):void
{
trace("SoftKeyboardActivated");
}
protected function onKeyboardDeactivate(event:SoftKeyboardEvent):void
{
trace("SoftKeyboardDeactivated");
}
}
}
Any ideas how to get those handlers to function properly?
Also an additional issue is when the softkeyboard comes up the screen is not panning even though I've set "softKeyboardBehavior" to pan in the -app.xml file.
