Flex :: TextArea Strings And Prohibited Characters I.e. <meta Charset="utf-8">?

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=&#0034utf-8&#0034;>, but obviously this doesn't work.

View 1 Replies


Similar Posts:


Flex :: Cut The Strings Longer Than N Characters?

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

Flex :: TextArea Unicode Characters With Control Key?

Jan 16, 2010

I am developing a Flex based window application. In that I have used a textArea, Now when I type some characters like ctrl+b, ctrl+e or ctrl+q, it shows some square characters in text area, I think these are some unicode characters but why these are being entered.

Unlike in simple textArea control on adobe example when I presses these key combination, there is nothing being entered, so why this only with me.

This is my window setup code

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"

[Code].....

View 1 Replies

Flex :: Changing Spark TextArea Text Color Dynamically Over A Range Of Characters?

Dec 22, 2010

I am attempting to dynamically change the color of a subset/portion of text in a Spark TextArea control. Using the MX-based TextArea, I could leverage the mx.controls.textClasses.TextRange type and change the color directly as follows:

TextRange tr = new TextRange(theTextAreaControl, false, beginIndex, endIndex);
tr.color = somePredefindColor;

Input Parameters to TextRange constructor:

1st argument: The TextArea control that will provide access to the underlying textField property
2nd argument: Indicates the TextRange will not modify the content of the TextArea
3rd argument: The beginning index position in the TextArea text string
4th argument: The ending index position in the TextArea text string

How would I go about doing this for a Spark-based TextArea control? I am looking to dynamically change the font color for a range of text, not just the entire TextArea AND I cannot statically specify the font color. The problem I run into when trying to re-use the TextRange type is that the 1st argument is expected to provide the textField property, which is currently not on the Spark-based TextArea control. I thought about extending the Spark-based TextArea control to provide this accessor property but that seems like overkill and is probably not the best approach.

View 1 Replies

ActionScript 2.0 :: Substituting Characters From Strings?

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

ActionScript 2.0 :: [fmx] Substituting Characters From Strings

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

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

Actionscript :: Chinese Characters In Strings For Dynamic Text In Flash?

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

Actionscript 3 :: Count Number Of Specific Characters Or Strings In A Txt File?

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

ActionScript 3.0 :: Prevent Scrolling In Textarea Not By Limiting Characters

Jul 2, 2009

I need the ability to create a TextArea entity in a constrained area (i.e., it is located at x and y and is w pixels wide and h pixels high and have that never change.), containing a proportional width font. As such, no 'num char entry limit' strategy is feasible. They need to be able to fill the entire area, and if that means 1,000 period '.' characters, or 200 '#' or "W' characters, then so be it.

The two lines following this one consist of 30 periods followed by 30 Ws.
..............................
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

I cannot limit a user to 30 characters. They need to be limited by using a TextArea that will let itself be filled until full, and then refuse further input until space is created by removing existing content. I then need to print that TextArea _as rendered on the user's screen_. Any 'scrolled' lines would be unprintable, and therefore the user's entry must be limited BEFORE any scrolling occurs, or contrariwise, when scrolling occurs, the last entered content would need to be removed and the entity forced to un-scroll. I can program this. It won't be elegant, and in fact will be quite stupid, as any programming where a change event is called with each keystroke or paste and then conditions tested is inefficient, wasteful, and well.

View 3 Replies

Actionscript 3 - Flash CS4 : Differing Behavior Between Console And Textarea For Printing UTF-16 Characters?

Mar 31, 2011

trace(escape("д"));

will print "%D0%B4", the correct URL encoding for this character (Cyrillic equivalent of "A").However, if I were to do..

myTextArea.htmlText += unescape("%D0%B4");

What gets printed is:

Ð

which is of course incorrect. Simply tracing the above unescape returns the correct Cyrillic character, though! For this texarea, escaping "д" returns its unicode code-point "%u0434". I'm not sure what exactly is happening to mess this up, but...

UTF-16 Ð in web encoding is: %FE%FF%00%D0%00%B4

Whereas

UTF-16 д in web encoding is: %00%D0%00%B4

So it's padding this value with something at the beginning. Why would a trace provide different text than a print to an (empty) textarea?

View 1 Replies

Actionscript 3 :: Flex Embed Png, Meta Data Required?

Jul 19, 2010

this is a part of my code

[Embed(source='dmr/images/icones/icnPresenceInline.png')];
[Bindable]
private var presentAuBureau:Class;

View 3 Replies

ActionScript 3.0 :: Trimming The Charset Of An Embedded Font

Feb 5, 2009

I have been embedding some non-standard Fonts into my Flash application using the "New Font ..." action from the Library pane. I exported the Font for AS, and there are no problems using the font.

However, from the reports, I noticed that the entire charset of the font is embedded by default. Since I only need the the alpha-numeric characters plus a couple of symbols, I was wondering if there is a way for me to trim the embedded charset (either from the Flash UI or via AS)? I remember in archaic versions of Flash, you can specify exactly which characters to embed in the SWF. Is this feature still available somewhere?

I wanted to keep the SWF lean and mean, and I don't want to load the font in run-time (some browsers disable font loading by default).

View 0 Replies

Flex :: Removing Flash Meta-policy Communication Warning?

Jun 6, 2009

I am communicating to an external server via a URLLoader and receiving the following warning: Warning: Domain domain name does not specify a meta-policy.Applying default meta-policy 'master-only'.This configuration is deprecated.

The provided link redirected me to another page, which didn't really explain how to remove this warning. It looks like it might involve modifying the crossdomain.xml file on the server, but I'm not sure exactly how. how to remove this warning?

View 1 Replies

ActionScript3 :: Flex - What Types Of SVG Gradient Fills Are Supported When Using The Embed Meta Tag

Jul 7, 2009

I've been trying to embed some svg files into an AS3 project using the Embed meta tag. For example:

[Code]...

However when displaying these files as Sprites only some of the gradients are surviving the embeding process. From what I've found simple (2 step) horizontal gradients seem to stand the best chance of being preserved, but sometimes other kinds of gradients are as well. In one case simply rotating an object 90 degrees causes the gradient to vanish when displayed in flash. Does anyone know a rough set of rules to use when creating svg gradient fills so they are preserved when rendered in flash? BTW: I used Inkscape to create the images in question.

Update: Bizarrely the solution to this seems to be setting the opacity of any object in the svg file whose gradient isn't displayed properly to a value below 1. Don't ask me why this works but it does. It does however have the unwanted side effect of the objects edges not being rendered as smoothly.

View 4 Replies

Flex :: Fill A List With A Combination Of Database Entries And Meta-values?

Aug 31, 2009

I am acquiring the contents of a table to fill a dropdown box in a Flex 3 application:

<mx:ComboBox dataSource="{myList}" />

The list is populated by the contents of a database table of persons:

Public, John Q
Doe, Jane
...

The combo box, however, also needs to have some other meta-entries in it that do not come from the database:

ALL
ALL MEN
ALL WOMEN
Public, John Q
Doe, Jane
...

View 1 Replies

ActionScript 3.0 :: Push Multiple Strings Into An Array, And Some Of The Strings Are The Same?

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

Flex :: Set Conditional Locale Strings

Oct 21, 2011

I'm trying to localize my Flex app, I have been able to setup the locale specifics and all the stuff inside MXML tags, that works pretty well, my question is, what about if I have for example:

[Code]....

How can I change with ActionScript those two strings to an other locale?

View 1 Replies

ActionScript 3.0 :: Make The Text In A Textarea Go Until The Length Of The Textarea?

Nov 3, 2009

A little much put in the title, but my question is just that. I have the following AS3 code for my textarea...

addChild(Texta1);
Texta1.alpha = 0;
Texta1.blendMode = BlendMode.LAYER;

[Code].....

Unfortunately, when I start placing text in this text area. Either through code or user input, the text will be placed on a new line after about 80-100 pixels. Yet I want it to start a new line after 320 pixels (it's length).

View 0 Replies

Flex :: Exchange Strings Of Text Between It And Rails?

Dec 4, 2009

I want a Flex UI to send a string of text to Rails which will process and return a string of text. Wash, rinse, repeat. That's all I want. All of the examples I am finding are much more complex and not very informative given my noobiness.

View 1 Replies

Actionscript :: Flex - How To Insert Complex Strings

May 21, 2010

How to insert complex strings into Actionscript?

So I have a string

-vvv -I rc w:// v dv s="60x40" --ut="#scode{vcode=FV1,acode=p3,ab=128,ch=2,rate=4400}:dup{dt=st{ac=http{mime=v/x-flv},mux=mpeg{v},dt=:80/sm.fv}}"

[Code]....

That string has so many problems like some cart of it can happen to be like regexp BUTI DO NOT want it to be parsed as any kind of reg exp - I need It AS IT IS!)

How to put that strange string into variable (put it not inputing it thru UI - hardcode it into AS code)?

View 2 Replies

Actionscript 3 :: Flex - Constant Strings In Metadata?

Jun 16, 2010

I have something like

public class Controller {
[Observer("fetchEmployeesEvent")]
public function fetchEmployees() : void {

[code].....

View 1 Replies

Flex - Extract Multiple Strings From Paragraph?

Sep 27, 2011

How do I extract more than one email from a paragraph and output the result to a console?

var pattern:RegExp = (/^[-._0-9a-zA-Z]+@[-._0-9a-zA-Z]+[.]{1}[0-9a-zA-Z]+[.]?[0-9a-zA-Z]$/i);
var asd:String;
asd=tt.text;
trace(asd.match(pattern));

View 2 Replies

Flex :: Access Strings From Zend AMF Objects?

Dec 3, 2011

I'm using Flex 3.6 and ZEND AMF version 1.11

I have an array that shows in my trace using trace(ObjectUtil.toString(event.result))[code]...

View 1 Replies

Regex :: Flex - Matching Strings That Begin And End With The Same Character

Oct 28, 2009

I need to match a string that begins and ends with the same character in flex...I know the long hand way (RE being - "a[^(a")]a" | "b[^(b")b" | etc...), but I'm positive this isn't what I'm required to do (midterm tomorrow!);

I need to do this in flex, but if you can think of a short regex for it, I may be able to convert it to flex notation.

What I was thinking of was something along the lines of -

%%
int firstChar;
%x string;
%%

[Code].....

But this bugs me in a few ways, first, having that variable makes this not a regular language; second, I don't know if you can even use a variable to in a pattern match; and third, I don't know how NOT to match it, if it's just a normal string. And third, I don't know how to return everything that's been matched while in 'string'

View 2 Replies

Flex :: Data - Pass Multiple Strings Between Views?

Aug 10, 2011

I have a list of txt files and when one is selected it is read and assigned to a string variable. this string is then pushed to a view : pushView(viewer, string), where the string is displayed in a textarea. I want to also pass the relative path of the file also. Is this possible to pass two strings?

[Code]...

View 1 Replies

Flex :: Prevent Copying Style From One Flex TextArea To Another?

Nov 3, 2009

If you have two text areas with different styles (fontFamily, weight, color etc) and you copy text from one to the other it also copies the style from the originating text area. Is there any slick way to prevent that?

Here is a sample of code that will illustrate the problem. Type some text in the top box and some text in the bottom, then copy some characters from the top box to the bottom. I'm not using htmltext.[code]...

View 2 Replies

Flex :: Parse Boolean Values In Strings For Use With Function.apply

Mar 13, 2010

I'm using String.split to parse a command line string into an array of strings. The result is then used to call a function using the Function.apply API.If apply(null, ["17"]) is called with this function:[code]does not work (expected output: false Boolean; actual output: true Boolean).Is there a way to make it recognize "true" and "false" (or anything else) as Boolean values, just like it does with numerical strings? Ideally "true" and "false" should also remain valid string values.

View 1 Replies

ActionScript 3 :: Flex - Difference Between Single And Double Quoted Strings

Dec 16, 2011

I have been programming in actionscript for three months and I am very new to a lot of the details. I was programming in java in which there is an important difference between 'hello' and "hello". So my question is: In actionScript is it the same to use 'Hello' and "Hello". If not what are the differences?

View 1 Replies

Flex :: Parse Boolean Values In Strings For Use With Function.apply?

May 5, 2003

I'm using String.split to parse a command line string into an array of strings. The result is then used to call a function using the Function.apply API.

If apply(null, ["17"]) is called with this function:

static function test(foo:int):void
{
trace(foo, typeof(foo));
}

it works as expected (output: 17 number).

However, calling apply(null, ["false"]) or apply(null, ["0"]) with this function:

static function test(foo:Boolean):void
{
trace(foo, typeof(foo));
}

does not work (expected output: false Boolean; actual output: true Boolean). Is there a way to make it recognize "true" and "false" (or anything else) as Boolean values, just like it does with numerical strings? "true" and "false" should also remain valid string values.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved