Issue with Input TLF textfield in Flash as3 Adobe Air - actionscript-3

Input TLF textfield having issue while player inputting text in mobile.
When player focus into the TLF textfield,then mobile keyboard is opened.But when one start to enter text ,then TLF not getting any inputted character.
That means Input TLF not working as Input,its working only as dynamic TLF in mobile version.
To fix this issue,Adobe introduced "StageText" for only Mobile version.
StageText is perfect for mobile devices but it support all features of TLF textfield except RTL direction..
can anyone tell me whether its fixed or not?

If you are develop for iOS, then use FPTextField of the FPNativeUI.ane:
var textField:FPTextField = new FPTextField();
textField.frame = new Rectangle(50, 50, 100, 20);
textField.textAlignment = FPTextAlignment.RIGHT;
textField.setWritingDirection(FPTextWritingDirection.RTL);
textField.stage.addChild(textField);
Download ane: https://github.com/flashpress/FPNativeUI-ANE .
Compare StageText vs FPTextField: http://www.youtube.com/watch?v=BKYaoLtEmCU

Related

Libgdx scene 2d ui localization

I'm Libgdx begginner.
I'm trying to make game menu using scene2d UI.
Once the english version is completed, I am now going to create korean, japanese and chinese version.
but... asian letters are not visible or comes out strange..
So I checked the font using bitmapfont (following codes)
< at constructor >
font = new BitmapFont(Gdx.files.internal("skin/lotte.fnt"), Gdx.files.internal("skin/lotte.png"), false);
< at draw method >
game.batch.begin();
font.draw(game.batch, "안녕하세요?", gameViewport.getWorldWidth()/2,gameViewport.getWorldHeight()/2);
game.batch.end();
Above korean letters works well. But It is not working for scene2d UI skin.
Does scene2d UI skin not support asian letters?
I solved this problem.
the problem comes out reading the string from I18NBundle.
the following code has the problem,
Label titleLabel = new Label(bundle.get("strings/test"), skin, "lotte2", Color.BLACK);
tbl.add(titleLabel).padBottom(stage.getHeight()/20f).row();
but this code works well.
Label titleLabel = new Label("ㄱㄴㄷㄹㅁㅂㅅ", skin, "lotte2", Color.BLACK);
tbl.add(titleLabel).padBottom(stage.getHeight()/20f).row();
Thanks for "Tenfour04" & "Madmenyo" !

StageText multiline problems

So I am pretty new to this whole AIR for iOS development thing and am just dipping my toe into the StageText object for a project I am working on. I am having trouble getting my StageText to be restricted to a single line. (such as for username input)
The documentation is terrible from Adobe but blog posts I have found have said to pass "false" to the StageTextInitOptions which seems to sorta work, but not really. When I do this the read-only multiline property on the stageText option traces as "false" which is good but when I actually type in the field it still breaks and goes to the next line when it is full.
here is my code:
var stageTextInitOptions = new StageTextInitOptions(false);
stageText = new StageText(stageTextInitOptions);
stageText.stage = stage;
stageText.viewPort = new Rectangle(0, 0, w, h);
trace(stageText.multiline); //traces out as false
EDIT: The problem seems to be in desktop only, when the app is placed on an ipad the multiline limitation functions as expected. (The problem is it NEEDS to work on both desktop and ios)
Any ideas? thanks so much!
StageText uses native mobile keyboards only on iOs and Android. You will need to work with the TextField and wordwrapping on the Desktop.
Why would you not use a regular hardware keyboard on a Desktop though? It's as native for Desktops as it gets.
use :
var stageTextInitOptions = new StageTextInitOptions(true);

Mouse.hide() does not work over a hyperlink on a htmlText

Im using Mouse.hide(); function to hide the mouse cursor on AS3 using flash professional cs5.5 (compiling for AIR 2.5). Over almost the compete scene the mouse pointer is hidden but if you have a text field with html content on, the mouse reappear when you hover an hyperlink <a>. I need the link to be clickable but with no mouse cursor since the application is intended to run on a touchscreen.
Mouse.hide() in AIR does not actually work everywhere as in flash (checked mac, yet?)
A workaround here, has been floating around as the solution:
stage.nativeWindow.activate();
stage.nativeWindow.orderToBack();
stage.nativeWindow.orderToFront();
Mouse.hide();

AS3 - Turn classic textfield into TLF textfield

I have a classic textfield on stage that I would like to turn into a TLF textfield. How can this be done?
Thank you. Uli
If on the stage in Flash Pro, you could simply change the control.
From classic text:
To TLF text:
Programmatically I don't believe there's typecasting between flash.text.TextField and fl.text.TLFTextField.
Both share a .text property; however, are different in terms of capability such as html and text flow.

How to stop/convert TLF textfield used in flash files when you have list to search?

My designer provides me lots of MovieClips containing buttons and its states and most of them contain a TLF TextField.
Now I do not want to check each MovieClip where a TLF TextField is used.
Can I know exactly in which MovieClips and buttons a TLF TextFields has been used so that I can convert them to a classic TextField, or any method to convert all TLF TextFields to classic automatically by the compiler itself?
I tried deleting the TLF library from publish settings: it starts giving me an error, but still not pointing me to where TLF TextFields are being used.
You can change publishing settings to Flash Player 9. TLF wasn't around then, so the IDE will automatically convert them to classic text. Note, this DOES change the visual appearance of the text, AND it may have other effects on your FLA.