Sorting An Array With Special Characters
I have an Array with a lot of names, i.e. of cities. Now I want to sort it, but the names with special characters in it, like ", , , , , , , , " of course do not enter in the right position.
Anybody got an idea, how I could build a function to sort these names in the alfabetical order as they have to be - without changing them. That means "Zrich" has to be spelled as it is.
Is this possible?
Any ideas apreciated.
Fritz
FlashKit > Flash Help > Flash ActionScript
Posted on: 12-27-2003, 12:24 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Sorting Special Characters In XML File
Hi, hoping someone has and idea of how I can solve the problem of sorting special characters such as , , etc in an actionscript array. I am working on a dictionary which has been created in XML and loads into Flash. The characters all work in textfields etc but when it comes to sorting the array alphabetically I'm hitting problems with them.
Here's some of my code:
glossary_xml = new XML();
glossary_xml.onLoad = function(success) {
if (success) {
dictionary(glossary_xml);
}
};
glossary_xml.load('glossary.xml');
var allWords:Array = new Array();
in the dictionary function I basically push the words, their translations, gender etc into the array creating a mulitdimensional array. I'm using the following to sort the array which is sorting numerically first then alphabetically and is case insensitve.
allWords.sortOn("engWord", Array.CASEINSENSITIVE);
displayArray(allWords);
My problem is that all words beginning with , etc appear at the end of the array. How can I get "" to have the same weight as "a" and "" to have the same weight as "i" etc.
Much thanks to anyone with ideas! Mogs
Special Kind Of Array Sorting
Hello.
I need some help on writing a function that will sort this array:
Code:
var newArray:Array = [<game title="Game Two" date="5.05.2007"><pics /><videos /></game>, <game title="Game One" date="5.06.2007><pics /><videos /></game>]
By the 'title' attribute, or the 'date' attribute.
I know that I can use Array.sort() for this, but it will only work with the first attribute.
Please help.
Special Characters Same CharCode As Normal Characters?
Hey everyone
I have a key listener where I trace the KeyboardEvent:
Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, testIt);
private function testIt(e:KeyboardEvent):void
{
trace(e);
}
My problem is, that my danish character traces exaclty the same event as the letters aoa... All my danish colleagues have no problems getting the right charCode, but mine just can't handle it...
What can be the problem here????
Special Characters
I was wondering if anyone has encountered any creative ways for getting around using special characters in dynamic text fields. Specifically, getting text characters into Flash isn't a problem, but (using a third party extra) saving that info to a text file creates significant problems because the literal character is saved (or not depending on which character it is) to the text file and then won't appear on a reload. Aside from creating our own save utility (which we're working on), have you ever run across this scenario or heard of workarounds for this?
Special Characters
Hi,
This is make me crazy,
I have a text field set as html which as to receive content from a script.
If that contents contains special character it just does not display them how to do ?
the <> for example gives me that problem!
thanks
Special Characters
I have a problem when I load an external txt file into a dynamic textfield. Language specific charachters does not display properly when I launch my swf. What can I do?!
Special Characters
Hi,
I'm trying to load txt_files in to a dynamic textfiled and it works fine except for special characters like ", , ".
Does someone know how to solve this?
Thanks!
Magnus
Special Characters On Mac Os X
Hi, - I recently discovered that when I use System.useCodepage = true; in a swf where I import external txt files, - the special characters like , , and doesn't show if the swf is played on a mac with os x.
However, it works on mac 9.x systems and all the pc's I could test.
Isn't it strange to make a new os and then this is what you get??
Well, - can anybody tell me a way to get by this problem??
Regards
Godowsky http.//www.katrinegislinge.dk
Special Characters
Hi,
How do I encode these characters "<" and ">" in a dynamic textfield which has html formatting (myField.htmlText) without they being interpreted as html?
Thanks.
Special Characters
Hi!
can Somebody tell me why have I problems with especial characters when I'm loading variables from an external file?
For example I can not load the or the : chars.
Thanks!
Les.-
Special Characters
Can anyone tell me why special characters like , and are not
displayed properly when they are loaded from an external text-file?
The font used in the movie is arial CE and can display this characters.
MOVIE can ben found at : http://www.vanremoortel.be/p2003-fr%20agenda.swf
TEXTFILE can be found at : http://www.vanremoortel.be/fragenda.txt
Thanks for your help.
Bert.
Special Characters
Hi Everyone,
So, here's the skinny. I've got a project that needs to be in French and English. All my text are in text files that have been saved in Unicode UTF-16 format.
Thing is, some special characters are coming through, but not all of them. What's the deal with that? Why would it display some and not all. And the biggest kicker is the same characters that aren't displaying in one area are displaying just fine in another one.
I hope I'm explaining this well, I've been up for 29 hours now and my brain went to bed a few hours back.
Any ideas will be greatly appreciated. Thanks everyone.
Special Characters
Ho!
How can I enter accents in an array of words such that the words are accented when they are displayed on the screen?
eg the in cole
Thanks in advance,
Baldego.
Special Characters In MX
Hi,
I need load some txt file to a dynamictext box and i have some special characters like .... but i cant, the text is too long to change one by one. Where can i find a code to display correctly this characters?
Special Characters
Good day to all,
I have a question here, how do I include special characters such as superscript/subscript or other symbols into the text field?
Thank you.
Special Characters (....)
Hi
i've got Flash MX 2004 but now as i renew my old sites, the characters like .... in the dynamic text fields are disappeared.
What can i do???
thanx
Gilo
Special Characters
I was trying to figure out how to add special characters such as accents, fractions, the symbol for degree, etc to the text in a dynamic scrolling text box. On a FK forum, it said to use ALT plus the right combo of numbers/letters. I tried that--from within the scrolling text box where I wanted the character to appear--holding the alt key as I entered the numbers. Nothing happened. I feel really lame, but...
any suggestions out there?
thanks.
Special Characters From XML
HI!
I'm working in Flash using some special characters ("" and ...) from an XML file.
But those characters doesn't appear correctly.
Example:
" ------ "
... ----- _
Any ideas?
m.
Special Characters From Asp
Hi, i have a problem displaying special characters (spanish chars, like ) in flash through asp with loadvars object. The asp file returns a string to flash in URLencoded format like this example:
txt2=Sab%EDas+que+3+de+cada+4+ni%F1os+tiene+caries +en+los+dientes
where %ED is .
In the flash movie this character() is displayed like this [], and so others special characters.
What can i do to fix this???
Thanks for the help in advance
XML Special Characters
When I am loading XML data into my dynamic text boxes special characters are being printed out in their escaped form.
For example, if my XML document says :
<tag>"blah"</tag>
the dynamic text box will print out :
"blah"
I've tried embedding font outlines.
I've tried putting """ into my XML document.
Is there some sort of actionscript command that will tell flash not to translate these?
Thanks.
Brendan
Special Characters?
Hey,
I'm working on a name-creator for an RPG I'm making.
For the name-creator I'm using *.nam files (just txt files) wich I got from an open-srouce namecreator made in Java.
Because it's hard to work with this, I've made an application wich translates the *.nam files into an array.
The array, and the *.nam files consist of 3 parts. When you randomly pick 1 item of each part, a name is created.
The problem is that when I'm converting the *.nam files to an array, all the special characters are replaced with an can't-find-character-square. So when I copy the generated array to an *.as file (wich get's imported into the name-generater) I have lots of those squares.
Is there a way to go around this?
Thnx in advance,
PS:
- I've uploaded an *.nam file with this, and the result when you put it in the *.nam-to-array-converter.
- When I tried to save the txt-file, the squares were replaced with a '?'
Special Characters
i need to put in a copyright symbol. How to do you do this and all other special characters... in MX 2004
Thanks,
Kev
Special Characters Again
Hey thanks to Joe and the others for their help in the newbie section... but I still can't believe there isn't an easy way, like a menu or a key combination to produce special characters in MX 2004.
To make my quesstion clearer..... I really need to find out how to make a text copyright symbol(with the text tool?) and other special characters for that matter. I'm going through this tutorial and they do it in the tutorial...but they just tell to put it in ,and they don't mention anything about special characters or of course how to use them. I checked in the sample files accompaning the book and sure enough there is a copyright symbol inside of text that seems to be created with the text tool
again thanks a bunch,
kev
Special Characters
I have problems with special characters to be seen in Flash MX. Using the Arial CE or Times CE or Courier New etc I can see the special characters while editing the text in the scene. When previewing it as Flash or HTML or whatever I do not see them. Actually not always. That 'not always' confuses me.
I managed somehow to select the whole word with the special character and changed the font from Arial to Times, for instance, but that works sometimes and then it doesn't work again. If I have the whole text written in, let's say, Verdana, and then special characters show in Arial, it's confusing, but then sometimes Arial doesn't show them at at all....and sometimes it does.
I'm talking about special characters like 澹 ---> you can see them here if you change the view code to windows-1250.
I'd deeply appreciate the help
Special Characters In Xml
how can I avoid that special characters drop out in a xml-document?
I've built a calender in flash that I feed with a xml-doc that is exported from a calender program (mozilla). my prob is that this xml-doc is ready tagged when i import it into flash. This causes special characters (norwegian-language - normally tagged å etc.. in html) to drop out when displayed in flash.
What I could do is to include a line of code in the xml doc- before I import it into flash. But my problem is that I want this to be as simple as possible for those who are gonna use the website
therefor:
can I somehow include a sscript or somthing in flash to make flash diplay these caracters?
I use standard components like xml-connector & data grid in my app.
help...
Special Characters In URL
Hi
I need to send a some variables from Flash through asp to a database. These variables are sent from an input textfield, but when the user uses special characters like danish , or , the result in the database are æøå. On the same page, the user are supposed to write his/hers email-adress in another inputfield, but if , , are used in the other field, the email never arives! How do i make the special characters to be written correctly in my database?
Special Characters
Does anyone know how to display in flash from a dynamic database? I have tried URL encoding %e9 but unfortunatley it does not work.
Thanks in advance
Jamie
Special Characters
i am having trouble importing special characters from an extural text file
this is what is in my text file >
var3="Hfstrm"&done="done"
when i trace var3 i get "Htrdone="done" ???
for some resoin it is seeing done="done" as part of the var3 string
is there some this i can replce the charicters with like %26 for &
Special Characters
Newbie, here, so bear with me.
This is such a silly question, but I can't find its solution in Flash online help or my text. How do you create the copyright symbol within an fla?
Special Characters
Hi guys,
Just a quick question for you all...
I am loading text from a .txt file on my webserver into a dynamic text field in my flash movie.
This all works fine. However I have problems loading in 'entities' - html coding for special characters such as the pound sign '' being displayed as '£'. The text file has to have these displayed this way and I am unable to change this. I was wondering if there was a way for flash to automatically convert these to proper characters. I don't want to have to sit down a do a load of if statements by hand to change the text for every single instance. This would just take forever.
Any ideas on how to sort this would be much appreciated.
Thanks in advance.
James
Special Characters
I haven't touched Flash in a little while and am having trouble wrapping my head around a simple problem.
I've got a basic form that sends varialbes to PHP which genereates an email. Everything works fine except for certain characters are being automatically URLencoded and I don't want them to be.
If this is my input: & and " and < and >
It will look fine in a dynamic text field: Name: & and " and < and >
But it will trace this: Name: <TEXTFORMAT LEFTMARGIN="5" RIGHTMARGIN="5" LEADING="-6"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#333333" LETTERSPACING="0" KERNING="0">& and " and < and ></FONT></P></TEXTFORMAT>
I don't want these variables being passed to PHP with all of this extra font info and URLencoded. Am I overlooking something obvious? Do I need to write some code to replace each HTML entity with it's original character?
Again, I have searched this topic plenty and seen lots of solutions and advice, but none that I can figure out how to make work for me. Thanks in advance.
Special Characters And UTF-8
hi all so i have fixed an issue of the special characters by converting my file to Unicode UTF -8 format, and i can see it locally - but not from my server...
any ideas on this?? im running apachy. thanks
Special Characters
hi,
i have some german titles to display. basically i use this code:
Code:
function textField() : Void {var text:String = '';
var arialReg:TextFormat = new TextFormat();
var txtField:TextField = _root.createTextField('back', _root.getNextHighestDepth(), 0, 0, 70, 10);
arialReg.size = 12;
arialReg.font = 'arial';
txtField.embedFonts = true;
txtField.antiAliasType = 'normal';
txtField.autoSize = true;
txtField.text = text;
txtField.textColor = 0xff0000;
txtField.setTextFormat(arialReg);}
now: when i open and save the class files with the flash ide, the special charakters like: do render correctly when viewing the swf. but when i open and close the class files with eclipse and fdt, i get rubbish.
under the eclipse properties menu i have utf-8, so i don't know, what else i could do.
any ideas?
Special Characters?
Hi,
in my movie I read out some XML files and place these in dynamic text boxes.
Now, in these files there are some characters that come out way wrong.
For example the characters ,,, ... come out wrong.
I get other strange characters instead. For example:
gives me 1/4.
What can I do to prevent this.
THX
Special Characters, Yes I Know But....
So I'm having some serious issues with my flash site showing special characters.
My database is all UTF-8, the tables and the database itself. All the fields too.
My CMS enters information using utf8_encode to the database and displays it again using utf8_decode, and that works fine. Special characters show fine in my HTML pages in the CMS.
I've even used SET NAMES 'utf8' when I connect to my database.
The pages that display my flash content have
<meta http-equiv=content-type content="text/html; charset=UTF-8">
in them.
But for some reason I still get the following strange characters showing on my site... see attachment. It should read...
はてなブックマーク
worlds biggest
but it shows that mumbo-jumbo instead (ã¯ã¦ãªããã¯ãã¼ ¯
worldâs â biggest).
Any help in this would be great. I've gone through the other threads on here and tried their solutions but nothing worked and I feel I may be doing something extremely stupid here.
Special Characters
Hello guys. Here goes a tricky question that is giving a hard time.
I have a dynamic text box. that text box, it's inside a movieclip that is masked. so far so good... it's loading the text from a text.doc, and editing it from a css file. the font it's embed in the library and load in the action. the text box as the option "use device fonts" active. All works expect for the special characters. It doesn't read them.
It's this far I goes...can't solve the problem.
Some kind and gently soul help me on this please?
I've add an example, for if anyone what to see closer
example.zip
thank you all
Special Characters Ie ü ø
hi there i need to put special character into a text field that i'm loading from an external txt file ie i need these characters:
ü ø é
i have the codes for them but when i put the code into the text it deosn't display and cuts out the rest of the word!
any suggestions??
Thanks
Special Characters With XML
Having trouble displaying a french character (specifically an accented e) coming from an xml file in a dynamic text field. I have already tried the following...
System.UseCodePage=true; --- this causes none of the text to show up at all.
xml file as UTF-8 ... I have saved out the file as UTF-8, ensuring the byte order is UTF-8 and the encoding is set to UTF-8 inside the XML. When I do this, I turn of the UseCodePage because it's UTF. This causes the accented e character to show up as strange characters (box on PC and copyright character on a Mac).
embedding the character as part of the text box's font set.
setting up french characters in the UNICODE table application config file and embeddign these characters with the text box.
I have also tried all of the above in various appropriate combinations. If anyone has a clue or an idea, please let me know. I have been all over the web, in every book, forum, etc. This is for work so if I can not solve it, I am SCR*WED. It is a huge project that has already been created in English and now I have to do various languages. Also, I can not really paste the code because there is alot. However, if someone is willing to take a look, I will send some code. Thanks for any input you may have.
XML And Special Characters Again.
Hi,
I have no explanations on this. Please anybody check this attachment. I really cant understand why this Menu is not reading accents. Thanks a lot to anyone
cheers
Claudia
Xml Special Characters
I have developed a help plugin that pulls in xml data.
When we use a language with special characters they dont seem to get converted correctly. When using English everything is 100% OK, but when we switch to German any letter with an umlaut above it comes out as a little square icon.
The XML file does have encoding set to UTF-8 so not sure what the problems might be?
XML Special Characters
I have a simple presentation that will be edited by a customer - eveything is locked down except an XML file.
This issue that I am running into seems to be very common.
The company uses dashes in almost everyone of there location names (Atlanta-Buckhead).
My issue is that the dash is not showing up once the XML has been loaded into flash.
<locationname>Atlanta-Buckhead</locationname>
Would Read:
Atlanta Buckhead in the final presentation.
<locationname>Atlanta%2DBuckhead</locationname>
Would Read:
Atlanta2DBuckhead
I have tried several possible solutions that don't seem to be helping.
1. URL encoding
2. System.useCodepage=true;
3. HTML encoding –
Any help on this would be much appreciated.
Attached is the actionscript that imports the XML (I don't think that this is the issue - but I dont know what is)
Thanks in advance!
Attach Code
holder_mc.loadMovie("images/location.jpg");
function loadXML(loaded) {
if (loaded) {
_root.location_name = this.firstChild.childNodes[0].firstChild.nodeValue;
_root.location_address = this.firstChild.childNodes[1].firstChild.nodeValue;
_root.location_city = this.firstChild.childNodes[2].firstChild.nodeValue;
_root.location_phn = this.firstChild.childNodes[3].firstChild.nodeValue;
_root.location_fax = this.firstChild.childNodes[4].firstChild.nodeValue;
_root.location_email = this.firstChild.childNodes[5].firstChild.nodeValue;
_root.location_www = this.firstChild.childNodes[6].firstChild.nodeValue;
locationname.text = _root.location_name;
address.text = _root.location_address;
city.text = _root.location_city;
phn.text = _root.location_phn;
fax.text = _root.location_fax;
email.text = _root.location_email;
www.text = _root.location_www;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml/location.xml");
emailtxt.text = "E-mail Us"
Special Characters
Heya,
We've recently gotten a new customer, they have the character "é" in their name. I am having some trouble getting this character to display on my devnet controls on my flash movie I am just getting a box instead.
The company name is loaded in to the movie via a URL Encoded string.
Does anyone have any idea's how to get this displaying?
My movie has the following code on the first frame:
_global.style.setStyle("fontFamily", "Verdana")
This sets the font for the devnet controls, I do not know if this is of importance.
Thanks
Edited: 10/14/2008 at 08:30:15 AM by LeahSmart
Special Characters
I have a text field I'm loading text into. This text is has an amp symbol in (&) denoted in html as &. Basically, I need to know the requirements for special characters and how they are rendered in flash. Especially when they are being pulled from an external file that has multiple variables stored in each file.
Special Characters In XML
this isn't necessarily a flash question, but I am importing an xml file into flash. In the XML I need to display a left bracket (<), and I tried using ‹, but this does displays litterally, and doesn't render as the left bracket character. Is there another way to do this?
Special Characters In AS
ActionScript Code:
on (rollOver) { timezone = "6:00 pm 3/25/04";}
Does anyone know why this will not output the colon or slash? Any help os appreciated!
Special Characters
hello there.
I'm kinda new to flash at all.
Suppose i want to use some characters for the font Webding, how can i choose a specific character ? is there a list of all the characters in the font that i can choose from?
I'm using Flash MX 24 Pro.
Thanks
Special Characters
I made a dynamic text field that loads in a html file.
When i use special characters in the html file like (stuff like that) it doesn't show them in my flash file.
This is my script to load the html including the css file.
var styles = new TextField.StyleSheet();
styles.load("theCSS.css");
theText.html = true;
theText.styleSheet = styles;
var lv:LoadVars = new LoadVars();
lv.onData = function(content) {
theText.text = content;
}
lv.load("theHTML.html");
is there some way to make the special characters visable ?
Thanks in advance
|