Solved

FlashPaper - Converting Unicode text to normal text

Posted on 2006-07-12
5
394 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 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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.

718 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