Solved

FlashPaper - Converting Unicode text to normal text

Posted on 2006-07-12
5
392 Views
Last Modified: 2008-01-09
I am using FlashPaper on a project and I select the text in the display using the text selector icon and then use fp.getSelectedText() - this gives me the Unicode of the selected text - Now how do I convert this Unicode text into normal text?

0
Comment
Question by:krishnaprathab
  • 2
5 Comments
 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 17092404
Put following action script on begining of first frame.

System.useCodepage = true;
0
 
LVL 9

Author Comment

by:krishnaprathab
ID: 17096213
Hi Dushan,

I tried using System.useCodePage but it doesnt help.

This is the code which I am using:

System.useCodepage = true;

this.createEmptyMovieClip("holder", 100);
holder.loadMovie("flex.swf");

intID = setInterval(select, 5000);

function select()
{
fp = holder.getIFlashPaper();
trace(fp.getSelectedText());
}

and this is the output I am getting when I have some text selected in the loaded FlashPaper

Ú±® ½±²­«³»®ó±®·»²¬»¼ ¿°°´·½¿¬·±²­ô ­«½¸ ¿­ »ó½±³³»®½»ô ¬¸» ©»¾­ °¿¹»ó¾¿­»¼ ³±¼»´ ¿²¼ ´¿½µ
±º ½´·»²¬ó­·¼» ·²¬»´´·¹»²½» ½¿² ³¿µ» »ª»² ®»´¿¬·ª»´§ ­·³°´» ¬®¿²­¿½¬·±²­ ½±²º«­·²¹ ¿²¼ »®®±® °®±²»ò ß­
¿ ®»­«´¬ô ±²´·²» ¾«­·²»­­»­ ¿®» ´±­·²¹ ³·´´·±²­ ±º ¼±´´¿®­ ¬± ¿¾¿²¼±²»¼ ­¸±°°·²¹ ½¿®¬­ ±® ½±­¬´§
½«­¬±³»® ­»®ª·½»½¿´´­

- KP
0
 
LVL 17

Accepted Solution

by:
Dushan De Silva earned 125 total points
ID: 17113028
Hi,
That only tells flash to use default charset on the computer the flash movie is running.

System.useCodepage = true;  is actually good for debug and developement time, but I WOULD NEVER SUGGEST it to use in production, since it's not portable solution!

Here's a table listing symbols of Mac's encoding:
http://www.alanwood.net/demos/macroman.html

Here's a standard ANSI encoding you need to convert to:
http://www.alanwood.net/demos/ansi.html

Sorry I can't give you an already-made conversion table, but with these links, it should be straightforward to make one (use unicode numbers to join two tables).


BR Dushan
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question