Multilingual character typing in flash file
Hi
I am trying to make a dynamic text(multilingual text area) area in flash using action script. I am not able to type conjuncts character in that text area. There are number of characters in every language. For that reason I am not able to map all characters in 92 windows (` 1 2 3 4 5 6 7 8 9 0 - = ~ ! @ # $ % ^ & * ( ) _ + q w e r t y u i o p [ ] \ Q W E R T Y U I O P { } | a s d f g h j k l ; A S D F G H J K L : z x c v b n m , . / Z X C V B N M < > ? ‘ “---possible to type these characters through keyboard. )
1-31 are useless,
32 is space,
33 to 126 are for alphabets, numbers and symbols,
127 to 160 are also useless,
161 to 255 are use full for conjuncts and other extra characters
(This is the way to map Indian characters)
If we want to type 161 to 255 characters than we can type through right "Alt" key + 0+window number. And there is no alternative way to type these characters.
So please give some idea ?
Ananta
Re: Multilingual character typing in flash file
Hi,
Usually apart from Latin 1 character set, the Pan-European languages use the upper ascii values. They can be enabled in windows. You can find the details at http://www.microsoft.com/typography/...ng/default.htm
But if you are using Indian languages you will be having a regional language hoverware which does the character mapping.
While using dynamic text fields, the issue is most of time the ability to embedd all the gyphs for a particular font (for that language.)
If you are sure that the characters are within the 255 range you can use the [..] option to embedd all the glyphs for that particular font. But if they are beyond this ascii values ie if they are unicode values this wont help.
Flash currently doesnt support unicode, but if you are using win2000 you can switch the input locale and system locale to the language you want and try keying in using an input method of your preference.
For dynamic fields usually the data comes from a non keyboard source (from db or within actionscript). If you are using a input text field, then after embedding the fonts you should be able to keyin using keyboard. If hoverware doesnt support that, you can create a flashbased keypad (with character mapping) for users to enter.
You can even create a custom font with the characters you need and embedd them as well.
You can send me a mail if you need further clarification.
regards
How do I embed other fonts in Flash??
Dear Sir:
How do I embbed Farsi(persia) or Arabic fonts in Flash without breaking the text. I am new to this I hope you can help.
Thankx a lot
John
Re: How do I embed other fonts in Flash??
Hi,
If you are a windows user use win98 or win2000 (win2000 is ideal for multilingual development). In win98 you can add arabic language.
1. go to control panel
2. choose keyboard
3. select language option
4. add arabic
Now once you are in flash choose arabic from you language selector on taskbar and start entering. To see the fonts correctly choose "Traditional Arabic" font. You can install your own arabic fonts as well.
If you are using win2000.
1. go to control panel.
2. choose regional settings
3. select the language you want to support and add.
4. Now go to input locale and choose arabic - language(country).
5. you can set the default system locale to the arabic and country of your choice (Saudi Arabia, Qatar etc). The system will prompt you to restart.
While in flash choose arabic in your taskbar and start entering in arabic.
regards
Embed other Fonts in Flash
Dear Parameswaran,
Thank you for your reply. I went to control panel, using win98 and than keyboard and then Add... but on the list there is No Persian or Arabic listed. I find it strange.
Not sure how to install Persian or Arabic Fonts to work in flash.
Hope to hear from you soon.
John
Re: Embed other Fonts in Flash
Which is your Operating System? Windows 95/Windows 98 or Windows 2000 ?
Quote:
Originally posted by flashersNew
I went to control panel, using win98 and than keyboard and then Add... but on the list there is No Persian or Arabic listed. I find it strange.
John
Not appending my inputs in textfields
HI Viswanath
My input are not appending in textfields of other swf file.
I have two textfield in one swf file and flash keyboard is other swf file. If I click on any key than I get only one character in other swf file, character are not appending.
Example of button action(message is textbox):
on (release) {
_level0.message = message add "D";
}
How I will use here Selection.getFocus() for typing in both textfields.
Please help me
Ananta
Re: Not appending my inputs in textfields
Hi,
try
_level0.message = _level0.message add "D"
Selection.getFocus() returns the currently selected text field.
Your text fields can be within two movieclips and on mouseup you can store to a temp variable the value returned by Selection.getFocus().
Now instead of hard coding which text field to add characters you can use your temp variable to point to the appropriate text field to add.
(I have detailed it in an earlier post)
But this is needed only if you have two textfields.
Quote:
Originally posted by ananta2002
Example of button action(message is textbox):
on (release) {
_level0.message = message add "D";
}
How I will use here Selection.getFocus() for typing in both textfields.
[Edited by Viswanath Parameswaran on 01-10-2002 at 10:54 AM]
It is appending after last character of textfields
Hi Viswanath
This action is working but it is adding "D" character after last character of the textfield not in other place.
_level0.message = _level0.message add "D"
Ananta
Re: It is appending after last character of textfields
Hi,
Could you explain further. I can't seem to get the exact issue. Because this would keep on adding the letter "D". If you use another button with letter "E", it will add "E" etc.
Quote:
[i]Originally posted by ananta2002 [/i
Hi Viswanath
This action is working but it is adding "D" character after last character of the textfield not in other place.
_level0.message = _level0.message add "D"
Ananta
Re: Re: It is appending after last character of textfields
Hi Viswanath
If I am typing "D" character using my visual keyboard in the textfield in anywhere than this "D" is coming after last character of the textfield. This "D" character should come after the curser. For example:
This is a |visual keyboard.
(Suppose I want to write "new" before "visual" word than see the problem ... it is coming after "keyboard.")
Combination of conjuncts in flash is possible??
Ananta
Re: Re: Re: It is appending after last character of textfields
Hi,
Use Selection.getCaretIndex() to find the cursor position and then add the letter at
that position. ie.,
For the controller movie clip
-----------------------------
onClipEvent (mouseUp) {
// gets activated only if you click in the text box
if (Selection.getFocus() == "_level0.message") {
// assigns the cursor position (index) to myVariable
_root.myVariable = Selection.getCaretIndex();
}
}
When you press the button we have to split the message display into two parts. One is from
the begining till the cursor position and the other from the cursor position to the
end. ie.,
For the button
--------------
on(press){
part1 = _level0.message.substring(0,_root.myVariable);
part2 = _level0.message.substring(_root.myVariable,_level0 .message.length);
_level0.message = part1 add "D" add part2
_root.myVariable++;
}
Re: Re: Re: Re: It is appending after last character of textfields
Hi Viswanath
Thanks for your help
Now please solve my last question of 01-10-2002, I mean how to make dynamic conjunct combination making for Indian language in flash.
Ananta
Re: Re: Re: Re: Re: It is appending after last character of textfields
Hi,
I have made a sample application which uses conjunct characters. It is done in latin character set. The principle can be same for indian languages as well, if we are using ISCII character set.
You can view and download it at:
http://www.info-designers.com/flash/...l/conjunct.htm
(Try in IE)