Welcome, Guest. Please login or register.
Did you miss your activation email?
05/22/12, 17:35
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash and AS 3 (Moderators: papachan, kofi addaquay)
| | |-+  AS3 post CS3 hiding loaded text
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: AS3 post CS3 hiding loaded text  (Read 962 times)
orcano
Server what's that
*
Posts: 1


View Profile
« on: 05/04/10, 16:37 »

Solved! Turn off anti-aliasing when importing external text tiles - must select "Use device fonts"

Issue: Missing loaded text from external file. In CS5 using As3, maybe with CS4, but not in CS3.

Two dynamic text fields with instances of title_text0 and title_text1

Displays: "ello T" & "eetings T"
Copy & Pastes: "Hello T0" & "Greetings T1"

AS3
Code:
var XMLloader:URLLoader = new URLLoader();
XMLloader.load(new URLRequest("target.xml"));
XMLloader.addEventListener(Event.COMPLETE, onLoadXML);
function onLoadXML(event:Event)
{
var XMLdata:XML = new XML(event.target.data);
for (var i:int = 0; i < XMLdata.title.length(); i++)
{
this["title_text" + i].text = XMLdata.title[i]. @ name;
}
}
stop();


XML
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE data[
<!ELEMENT title>
<!ATTLIST title name CDATA #REQUIRED>
]>
<data>
<title name="Hello T0">
</title>
<title name="Greetings T1">
</title>
</data>


This happens when loading from *.txt and *.html as well.

XMLloader.dataFormat = URLLoaderDataFormat.TEXT; does not change this.

EDIT1::: It gets much worse when loading entire paragraphs, it's random, so it isn't just the first and last letters.
EDIT2::: Text formatting and text field formatting does not help.
EDIT3::: Displays missing characters as unformatted if changed  to TFL text, but rest still formatted.

Solved! Works with _sans, _serif, and _typewriter. The answer is!!! Anti-aliasing - must select "Use device fonts"
« Last Edit: 05/04/10, 17:33 by orcano » Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #1 on: 05/05/10, 19:09 »

As a general rule: if you don't embed characters or use device fonts, users whitout the typography will not see your text. Also text under masks or rotated should be transformed to path, that means should be embeded.
Also special characters breaks XML output, and usually you should use CDATA nodes for thius kind of text.
Give another try, but now embedding the fonts (not system fonts of course)

Jorge
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!