Solved

FlashPaper - Converting Unicode text to normal text

Posted on 2006-07-12
5
390 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:Dushan911
Comment Utility
Put following action script on begining of first frame.

System.useCodepage = true;
0
 
LVL 9

Author Comment

by:krishnaprathab
Comment Utility
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:
Dushan911 earned 125 total points
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
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.

728 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now