flash & xml question
- Started
- Last post
- 19 Responses
- goygoygoy
Hi, I'm trying to read special caracters (accents) from a XML file in flash. I know I've got to embed those special caracters, but textfields are dynamically created, so what is the trick to embed those caracters?
ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓ ÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæç èéêëìíîïðñòóôõö÷øùúû üýþÿ¿¡
I tried
System.useCodePage=true;
and
textField.embedFonts = 1;
but still doesn't show accents
thks in advance
- rabattski0
In the XML file, the first line needs to include encoding="UTF-8" e.g. (hope the pvn doesn't break it up):
- rabattski0
so it does.
new try (delete excessive spaces):
< ? x m l v e r s i o n = " 1 . 0 " e n c o d i n g =" U T F - 8 " ? >
- rabattski0
and than you can use those characters as they appear. e.g.: é etc.
- goygoygoy0
thks rabattski but it seems unsufficient. I already have
< ? x m l v e r s i o n = " 1 . 0 " e n c o d i n g =" U T F - 8 " ? > in my XML file...
I think the problem is more how to be sure that those caracters are well embeded in the flash, using dynamic textfields.
- rabattski0
have you embedded the font in flash? and does that font actually has special characters?
- goygoygoy0
well, I'm using textField.embedFonts=true;
and it does has special caracters...
- goygoygoy0
it does shows accents for textfielsd using datas from flash- arrays or variables but it doesn't for datas coming from XML...
- rabattski0
hmmm.... and how about this:
- rabattski0
that has more to do with how the actual xml file is saved. could be an issue as well.
- rabattski0
don't know if you're on a mac but System.useCodepage=true can generate weird results on macs.
- goygoygoy0
ok, thank for your help rabattski, I'll dig in macromedia's documentation
- rabattski0
good luck though.
- UndoUndo0
you could try using the hex equivalents ie. Å = Å in yr xml
- goygoygoy0
thks Undo, actually It seems the only things that will work, can you provide me with a link of a list with all those hex equivalent?
- Mario0
If you create a symbol of your font you can "refer" to it's ID from CSS.
.headline {
font-family: SymbolLinkageID;
}I don't know if this works, but perhaps this solves your problem?
- UndoUndo0
if you type or paste in your characters into a dreamweaver page it will generate the hex equivalents in the code.
good luck
- rabattski0
well thing is. it should be possible without using hex equivalents or html entities. but i know how a pain in the ass this can be.
- rabattski0
here's a list btw:
- UndoUndo0
v. useful list there rabatsski.