?
Solved

FlashPaper - Converting Unicode text to normal text

Posted on 2006-07-12
5
Medium Priority
?
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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 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. …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses
Course of the Month15 days, 15 hours left to enroll

743 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