Actionscript 3 :: Let Special XML Chars Unconverted In Flex?
Nov 5, 2010That's my xml node:
<node att="something < something else"> </node>
When i write in my code :
trace(xml.node.@att.toString());
[code].....
That's my xml node:
<node att="something < something else"> </node>
When i write in my code :
trace(xml.node.@att.toString());
[code].....
i'm having a bit of an issue with a multilanguage little flash chatprogram. It has a input textfield, the right fontdata and characters are embedded, but slovenian users can't input some chars Although it works when they copy/paste text into the inputfield, then the characters show and all seems well. But actually typing them seems to fail. So i know it's not the infamous wmode bug.
View 2 RepliesI'm running a flash game on asp.net frame. The flash is sending parameters to some asp.net page that save those parameters to a database. My problem is that if the parametrs contain special chars (Russian, Arabic...) then those chars are transform to question marks (?) I've tried to urldecode the parameters but without
The parameters that sent from the Flash are in unicode format and are urlencoded.
The asp.net code is:
string pp4 = "";
if (Request.Form["param4"] != null) { pp4 = Server.UrlDecode(Request.Form["param4"]); }
...
...
[Code]....
I'm trying to display htmltext from xml file in my dynamic text field.I used: dynamic_ txt. htmltext=textFromXML;I embedded the fonts Latin 1, Latin Extended A, because I want to display characters like "�", "�"," is space and it displays correctly, but "" which is "�" displayes "" so that does not work.
View 2 RepliesI'm sending an xml file from flash to php, so php can save it to the servers filesystem.It works great, except when there's a node with a special char like a quote in it.My actionscript code is like this:
Code:
xmlExport.xmlDecl = "xml=";
xmlExport.sendAndLoad("xmlexport.php", xmlExportStatus);
And my php code is like this:
PHP Code:
fwrite($handle,stripslashes(urldecode($_POST['xml'])));
Both somewhat simplified, but this is what matters I think.I'm not sure about the urldecode part, but I've got this problem always, no matter if I use it or not.I've traced the xml object, and I see that the quote is converted to ' then. That's great, but when php writes it, it stops there, so I end with only half of an xml file.
I'm looking for a regular expression that can remove all the following characters from a string (and Whitespace too): ~ % & ; : " ' , < > ? #
View 3 RepliesI use PHPMailer to send emails from my Flash-applications, but somethings goes wrong with special chars like the norwegian letters.
View 1 RepliesI found out that if XML file's attribute contains German special chars (chars with umlaut, like:..) then I get "undefined" answer when I try to read an attributes value. I tryed to change XML file encoding to: "UTF-8" and "iso-8859-1" but still no luck. "system.useCodepage = true;
View 2 RepliesI'm loading text externally from XML... when I use special chars like "�" that chars shows up followed by an "f"... Why this happens?!
check it![code]....
I am working on a Flex app that has a MySQL database. Data is retrieved from the DB using PHP then I am using AMFPHP to pass the data on to FlexThe problem that I am having is that the data is being copied from Word documents which sometimes result in some of the more unusual characters are not displaying properly. For example, Word uses different characters for starting and ending double quotes instead of just " (the standard double quotes). Another example is the long dash instead of -.All of these characters result in one or more accented capital A characters appearing instead. Not only that, each time the document is saved, the characters are replaced again resulting in an ever-increasing number of these accented A's appearing.
Doing a search and replace for each troublesome character to swap it for one of the none characters seems to work but obviously this requires compiling a list of all the characters that may appear and means there is scope for this continuing as new characters are used for the first time. It also seems like a bit of a brute force way of getting round the problem rather than a proper solution.Does anyone know what causes this and have any good workarounds / fixes? I have had similar problems when using utf-8 characters in html documents that aren't set to use utf-8. Is this the same thing and if so, how do I get flex to use utf-8?
I am using the following code to embed Arial into my application:
[Embed(source='../assets/fonts/Arial.ttf',fontFamily='CustomFont',fontWeight='regular',
unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F,U+0400-U+04FF,U+0370-U+03FF,U+1E00-U+1EFF,U+2022,U+2219,U+20AC-U+21AC',
[code].....
Currently I have :
<mx:HTTPService id="userLogin" url="https://api.localhost/api/user/login/" method="POST" resultFormat="e4x" result="doSomeThing(event)">
<mx:request>
[Code]....
instead of this I have params like userCredentials.email and userCredentials.password. I tried this but it odesnt work.
<mx:HTTPService id="userLogin" url="https://api.localhost/api/user/login/" method="POST" resultFormat="e4x" result="doSomeThing(event)">
<mx:request>
[Code].....
I have a Flex 4 app, which is in a full-window mode now.
Is it possible to place window of my Flex app just in the special div with fixed size (for example 400x400px)?
I've found it's often useful to special case the first item in a drop-down menu (ie, an instance of Menu). For example, if I want to pick a color from the list provided by a web service:
<mx:PopUpMenuButton id="colorSelelector"
dataProvider="{colorsService.lastResult}" />
I might also want a special-case, which is "enter a new color", allowing the user to enter the RGB values for a new color which isn't in the list. For example:
var newColor = { label: "Enter a new color", rgb: null };
Then used with:
<mx:PopUpMenuButton id="colorSelelector"
dataProvider="{colorsService.lastResult}"
lastOption="{newColor}" />
So, apart from changing the list I get back from the service, is there any better way to do this?
(and just a preemptive comment: this is a simplification... I'm not actually trying to make a color-picking-list)
I have a text field (for names) wich must allow all characters, except latin numbers, is this possible? I can't think of a regex for this
View 2 RepliesI am using E4X to bind some values from xml in flex 3.There is a problem when xml tag's (or attribute's) name has special character in it: having xml content
var xml:XML = <tag>
<special-name att="val" />
</tag>
special-name could not be accessed using xml.special-name.@att because it is interpreted as subtraction, on the other hand using square bracket notation xml['special-name'].@att breaks binding chain.
so I have a string "bla dla dla vre bla 54312" I want to turn it into "bla dla dla " by saying something like
function(string, "vre");
how to do such thing?
Is there any way to turn off all special FX's and especially dropShadow's on all objects inside the application ?
View 2 RepliesBasically I am using UTF-8 characters codes u0000 to u0008 as part of a socket server.I need a little regex pattern to replace these chars with somthing like a $ symbol to make them really obvious (while tracing output etc..).I believe it should be something like:
Code:
filter:RegExp = new RegExp("[u0000u0001u0002u00..]");
myNewString = myString.replace(filter, "%")
i have tons of input textfields (over 100) and i want to exclude some chars like '&' from them is there an easy way to set it so that all textfields wont use the chars i want to exclude?or do i accualy have to set them all manualy to not use them?
View 5 RepliesI'm working on my own buttons. It uses a dynamic TextField, and there's an issue that I can't figure out.
Used font is Lucida Sans Unicode, I exported this to the library, checking "Export for Actionscript..." in dialog window when exporting. Unfortunately, this exported font doesn't display my national chars - I'm from Poland and need letters like "ł" or "ś". They are in this font, but became unavailable after export.
Button photo (prepared "manually" before, looks the same, but text is without "ł"):
My code:
protected function prepareShape():void {
isActive = false;
bgMatrix = new Matrix();
[Code].....
I'm using FLASH form embedded into html which use utf8 charset to send variables and image to php script which saves them mysql.
In flash I do use fileupload method,
var loc:*=new flash.net.URLRequest("http://url.com/code.php?s=1&name=" + vardas.text + "&email=" + email.text);
fileHandler.upload(loc);
The problem is that when I open and fill up form in INTERNET EXPLORER, i receive not UTF-8 variables in php, but if I use CHROME or FIREFOX, i get them right.
Is there a difference how IE and other browsers send data? Or do I have to somehow encode variables in action script?
url in IE not supporting chars like č while CHROME AND FF DOES?
I have a textfiled (input type) which works with English lang. If I change to different locale in the system tray I am not able to write any text into the textfiled.
How can I enable this capabilty to the TextField or this is connected with locale/Language support in the swf?
I am trying to figure out why some letters (like the norwegian Å (Å)) are cutted out in the middle of the top "o":
My code is this:
var titleFormat:TextFormat = new TextFormat();
titleFormat.size = textSize;
// this is embedded font, and exported for action script, declared
titleFormat.font = myFontBold.fontName;
titleFormat.bold = true;
[Code] .....
So, I have tried different things like setting height hardcoded and bigger than text, but top us cutted again, I have tried with css but no success. Why the letter is not showed fully and why if I zoom in the swf (2-3 zoom ins) it shows up normal (and what i try to achieve) like this: I think it has to do with the topMargin, but unfortunately I didn't find something like that in as3 documentation.
I have to validate a textfield in AS3 if there are chars like # $ % @ ~ | {} [] / etc. i.e find unnecessary chars and remove them from the textfield. I use a search AS3 function which works with regular expressions, I would like a regular expression so that a search function searches the characters above and if it finds any of them then returns true.
View 2 Repliesi have tons of input textfields (over 100) and i want to exclude some chars like '&' from them is there an easy way to set it so that all textfields wont use the chars i want to exclude?or do i accualy have to set them all manualy to not use them?also how do i exclude chars? i have tried using the embed options on the text field.
View 1 RepliesI have a variable with the value "_level0.store.1" ... is there any function in flash with which i can just take the 15th character and remove everything that is before the "1" --> basically i'd like to use "1" to read that position from an array... therefore i want something that:
from: _root.nodeFrom = this --> returns "_level0.store.1"
I would get:
positioninArray = 1
I have a variable with the value "_level0.store.1" ... is there any function in flash with which i can just take the 15th character and remove everything that is before the "1" --> basically i'd like to use "1" to read that position from an array..[code]
View 4 RepliesI'm trying to make a login. How do I check to see if anything at all is typed in the string.
View 1 RepliesI'm trying to insert into a Dynamic_text a value with AS3.
The value is not in english and during run the value does not get inserted completely (there are missing letters).
Is there a way to insert a string value to dynamic text in a way that none english letters won't get missed?