Text can not input

31 views
Skip to first unread message

XinRex

unread,
Oct 2, 2013, 12:20:27 AM10/2/13
to aw...@googlegroups.com
hi,

In   we6.extras.gui.Text,at line 66 to 68
#if !flash
_isInput = false;
#end

means I can not use textinput to mobile phone? e.g. android.

if I develop some mobile game by awe6,will in trouble? :(

I like awe6,because it so clear and intuitive,so somebody help me? thank you !

Rob Fell

unread,
Oct 2, 2013, 1:46:33 AM10/2/13
to aw...@googlegroups.com
You can use flash.display.TextField directly if preferred (and addChild to any Context / Sprite).

But I'm not sure what state the OpenFL native TextField is in for input text?  When I wrote this code it did not work.
Maybe try removing this line and experimenting.  Please report back what you discover.

XinRex

unread,
Oct 2, 2013, 3:51:55 AM10/2/13
to aw...@googlegroups.com
Hi,Rob
    1.flash.display.TextField can work,when I create OpenFl project.
    2.awe6.extras.gui.Text can work,by modify:
        a) comment awe6.extras.gui.Text line 66 to 68.
        b) comment line 77,line 78,line 81.
        c) and modify to:
                if (_isInput) {
_textField.type = TextFieldType.INPUT;
}else {
_textField.type = TextFieldType.DYNAMIC;
_textField.addEventListener( KeyboardEvent.KEY_DOWN, _stopEventPropogation );
_textField.addEventListener( KeyboardEvent.KEY_UP, _stopEventPropogation );
}

ps:I upload the code of flash.display.TextField.

Text.hx

XinRex

unread,
Oct 2, 2013, 8:44:14 AM10/2/13
to aw...@googlegroups.com
comment we6.extras.gui.Text at line 198 to 201.

if text has been a value,and del some letters,then text can not changed,so after reset the text value,the result is incorrect.


在 2013年10月2日星期三UTC+8下午12时20分27秒,XinRex写道:

XinRex

unread,
Oct 2, 2013, 8:44:53 AM10/2/13
to aw...@googlegroups.com
My English is so bad,so I wish you get what I say.

在 2013年10月2日星期三UTC+8下午12时20分27秒,XinRex写道:

Rob Fell

unread,
Oct 2, 2013, 12:25:07 PM10/2/13
to aw...@googlegroups.com
Thank you.
 
I've updated awe6.extras.gui.Text to include the option to enable input text for OpenFL-native.  I have commented all target conditional code to explain the various issues - i.e. this does not work reliably / consistently (as it does for Flash target).  Html5 target remains off, for now.
 

XinRex

unread,
Oct 2, 2013, 2:13:09 PM10/2/13
to aw...@googlegroups.com
wow,good job!

在 2013年10月2日星期三UTC+8下午12时20分27秒,XinRex写道:
Reply all
Reply to author
Forward
0 new messages