ActionScript 2.0 :: Working With Escaped Characters In Strings
Aug 11, 2006
I am working with strings that need to retain the details of line returns as they were typed in and also characters such as speech marks (they will contain ascii art). I have looked at using the escape function but this doesn't seem to work--
[Code]...
View 1 Replies
Similar Posts:
May 9, 2011
I'm calling remote images with with a Loader and the context has checkPolicyFile=true, images load fine with urls like :url....the only difference being escaped characters, is this a bug or am I doing something wrong?url...
View 1 Replies
May 6, 2010
what's the easiest way to cut string in Flex ?I mean, I have a sequence of urls, I want them at most 60 characters length. If they are longer they should be cut and "..." should be added at the end.
<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="navigateToURL(new URLRequest(event.currentTarget.label.toString()))" />
View 2 Replies
Jul 8, 2004
I'd like to know how to substitute characters of strings.Let's say I have...
my_str="Hello, Johny!, hello Dolly!";
I want to substitute all "!" characters to "?". How do we do this?I am assuming that first we need to know the character position of the character we want to get rid of.(we would loop this whole 3 step process until no more "!" characters were found in the string)1 my_str.indexOf("!"); returns 12 2) Now...how do I delete that character?3) The next step from there would probably be to use one of the methods String.substring() or String.slice to introduce the new character "?";
View 2 Replies
Jul 8, 2004
I'd like to know how to substitute characters of strings. Let's say I have...
my_str="Hello, Johny!, hello Dolly!";
I want to substitute all "!" characters to "?". How do we do this?
I am assuming that first we need to know the character position of the character we want to get rid of.
(we would loop this whole 3 step process until no more "!" characters were found in the string)
1) my_str.indexOf("!"); returns 12
2) Now...how do I delete that character?
3) The next step from there would probably be to use one of the methods String.substring() or String.slice to introduce the new character "?";
View 2 Replies
Jan 4, 2011
I have a Flash file which contains some dynamic text boxes. ActionScript is being used to fill these boxes using strings. However, I can't seem to get Chinese characters to appear properly. I've tried the actual unicode character as well as their unicode-escaped equivalent but when I export the movie, nothing shows up (blank - it was assumed that the characters are not even present).
View 3 Replies
Apr 3, 2012
If I load a txt file into my flash movie using the following...
var myTextLoader:URLLoader = new URLLoader();
myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void {
[Code]....
I get my text imported and it splits it every time the letter 'a' is found. That's fine.
How would I go about counting the number of times that 'a' or 'and' (for example) featured in the text?
View 2 Replies
Jul 1, 2011
I'm trying to set the text of a TextArea with some text containing forbidden characters. I'm trying to set the text as <meta charset="utf-8"> and there is of course a problem with the "'s. I think it's something like this <meta charset="utf-8">, but obviously this doesn't work.
View 1 Replies
Apr 21, 2009
I missing a file that needs to reside on the server to get this working?
View 1 Replies
Sep 22, 2011
I'm trying to set only a portion of a string to use a particular text format and it does not seem to be working. I'm calling setTextFormat() after setting the text of the TextField like this:
myTextField.setTextFormat(newFormat, 7);
change the format for the remaining characters after the 6th. The textfield seems to use the default text format for the entire text however.
View 1 Replies
Sep 30, 2010
I have a problem with getting a string from server. When I get the string, it is encoded and I don't know how to encode it. In the string are normal characters and instead of special symbols are eg u010d, u011b and others. Are there some function to decode it?
View 1 Replies
Aug 21, 2010
I am fetching some variables from a URL and get the result. While I can iterate through it via e.g.:
[Code]...
View 7 Replies
Aug 24, 2009
I work on AS3 one week, and then take a break for a few weeks, then work on it a day, take a break, etc.. So I forget some of the basics, and need refreshers. I think I need to stop taking breaks.
Problem: I push multiple strings into an array, and some of the strings are the same.
Code:
var myArray = new Array();
myArray.push (Snivvle);
myArray.push (Kirupa);
myArray.push (Snivvle);
I want to find out which element positions "Snivvle" hogs up. We can see that it would be using element 0 and 2, and if we do an "indexOf" we would only get to see element 0, and doing a "lastIndexOf" we would only see element 2. How do I find out ALL of the element positions "Snivvle" is located in, so that it returns: element 0, element 2.
View 2 Replies
May 12, 2009
I have to embed VAGRounded bold. I can't seem to get it to work reliably. I have created 4 dynamic text boxes, one for each of the 4 styles and embedded the characters into each one for the 4 versions of the font. I then wrote some text directly into the boxes on the stage.
I created a 5th dynamic box and called it "test". I set the family to VAG ROunded, style:bold (ie just like one of the ones above). I then embedded the characters into it.
I added this dead simple as2
Code:
stop();
test.text="hello"
THis 5th text box looks NOTHING like the bold one from above, as you can see in the attached image.
View 2 Replies
May 12, 2009
I have to embed VAGRounded bold. I can't seem to get it to work reliably. I have created 4 dynamic text boxes, one for each of the 4 styles and embedded the characters into each one for the 4 versions of the font. I then wrote some text directly into the boxes on the stage.I created a 5th dynamic box and called it "test". I set the family to VAG ROunded, style:bold (ie just like one of the ones above). I then embedded the characters into it.I added this dead simple as2
Code:
stop();
test.text="hello"
[code]....
View 2 Replies
Feb 1, 2010
working on TLF with subscript/superscript and with special characters (,<,> ,¥, ¤ ..and so on). Can anyone point me to a tutorials or training?
View 0 Replies
Jul 8, 2009
I am trying to limit then number of characters in a dynamic text box, but its just not working. I am loading the text from an external xml file and thought that this might be the problem, but to be honest it shouldnt be really... I have put this code inside the movie clip:
ActionScript Code:
this.title_mc.alpha = 0;
this.q_mc.alpha = 0;
this.a_mc.alpha = 0;
[Code].....
View 3 Replies
Aug 17, 2009
I am having issue with my created flash, it can't handle chinese characters? is there some way i can handle this thru code? or should there be any font or language pack installed
View 3 Replies
Aug 23, 2010
1) Each field in the form only allows 3 characters and no special characters such as @ _ ! . , etc... 2) When the user goes to the next field in the form, the previous field appears blank but the when clicking on that again, the original text appears. 3) When submitting the form, it just keeps saying "in progress" and never shows the confirmation text nor does the email get sent. There is an HTML file included with this form but I am not sure if I need to put that in as I have embedded this form into an SWF file so I don't think I need that code but let me know if I am wrong about this. I am posting both the AS code and PHP code below..
[Code]...
View 2 Replies
May 30, 2010
My problem is that all my accentuated characters are displayed as weird iso characters. Example :© is displayed %E9 I send a string to my php file :
[Code]...
View 4 Replies
Mar 11, 2010
i know, that i have to CAST them... but how?add (adition) two strings...
a:String = "20";
b:String = "10";
c:String = a+b;
I get c=2010 and not 30 as i expected...i guess i have to cast, but how?
View 1 Replies
Mar 30, 2010
how to format strings better and pad for leading zeros.here's the code:
var dt, timeint;
dt = new Date();
var TimeText:String;[code]...............
View 6 Replies
Jan 29, 2011
I'm trying to solve an Actionscript problem using E4X.I have an XML like this one:
<root>
<person firstname="john" lastname="doe" age="21" />
<person firstname="jayne" lastname="doe" age="35" />[code]....
I want to have just one function search() that takes three parameters (firstname, lastname, age) and return an XMLList. So the result could look like this:
var result:XMLList = xml..person.(@firstname == firstName && @lastname == lastName && @age == age );
But I don't want to use all three parameters all the time. I would like to have a function that uses a 'wilcard' if the parameter is NULL. So if the wildcard would be "*" the function could look like:
searchPerson( firstName:String ="*", lastName:String = "*" , age:String = "*") {...}
so that I would only pass 'John' for the firstName I'd get the first and the third node in return.
View 2 Replies
Jun 26, 2003
i have a .txt full of words (strings) devided by lines and separated with ; and i want to be able to load 1 random line and the first string of it..xALI;DALI;IDEAL;DELIRAREDIAL;REPELIDAAMO;MATO;MORTA;MOSTRA;MAESTRO;BATERMOSi want to be able to load "ALI" for example. and then load DALI etc etci used loadvariablesnum to load the text, but maybe that shouldn't be the best option..
View 7 Replies
Jun 3, 2002
which characters need to be encoded for PHP and SQL, and how to do it?
View 2 Replies
May 26, 2009
I'm doing the finishing touches on my games. I want to keep track of and display the level (waveCount) and display it in a dynamic text box. However, AS isn't allowing me to convert the number into a string.
[Code]...
View 1 Replies
Mar 11, 2010
Here we go... i know, that i have to CAST them... but how? The idea is to add (adition) two strings...
a:String = "20";
b:String = "10";
c:String = a+b;
I get c=2010 and not 30 as i expected... i guess i have to cast, but how?
View 1 Replies
Apr 15, 2005
I have a texfield in which I would like to display to strings. Right now, I can only use one of the strings by doing:myTextfield.text = str1
View 3 Replies
May 26, 2009
I want to keep track of and display the level (waveCount) and display it in a dynamic text box. However, AS isn't allowing me to convert the number into a string.
PHP Code:
private var waveCount:Number = new Number();
private var waveOutput:String = new String (waveCount);
private var waveWord:Sprite = new WaveWord();
[code]....
View 5 Replies
Jul 5, 2009
I would like to compare a string variable to multiple strings. Is it possible?I wrote a pseudo code of my own which doesn't cause an bug/error report,but it doesn't seem to work properly either:[code]
View 3 Replies