This post is about how to remove duplicate characters from a string. And what I mean is that I want to make every char unique.
Ex: “aabbbcccaadddee” will become “abcde“.
In “short words” the following steps are taken:
Split the string to an array (source array)
Create a second empty array which will retain the unique values
Sort the [...]
Big RIAs need good interaction with the user. In big applications (like Buzzword, etc) with intensive text processing is a must to have implemented a spell checker.
A very good spell checker that is built in Actionscript 3 is Spelling Plus Library (SPL) by gSkinner - the license is here and can be bought from here.
It [...]
When speaking about RIA one of many nice usabilities is that to be able to give feedback to the user when it comes to critical actions like submitting important data, saving work, etc. Let’s have the following example: You log in into a RIA with your user and password, you do changes to your data [...]
Yesterday I had to do a small flex application that resided on a server with php. Since I required a connection to mysql I wanted to use the same class I did before to connect to web-services. But PHP does not support web-services (and WSDL) by default.
So after I did some search on the net [...]
If you have a label and you want to show a hand cursor when the mouse is over it you have to set three properties as bellow:
lbl.useHandCursor = true;
lbl.mouseChildren = false;
lbl.buttonMode = true;
where lbl is
public var lbl:Label = new Label();
Job’s done!
Today I found a way to remove the “black line” of a tree which has drag and drop functionality enabled. I did that by skinning. Searching through the help I’ve been crossing over a property named “dropIndicatorSkin” where (as its name is suggesting) the drop line is drawn. So I just re-skinned it.
Here is the [...]
This it’s an working example of how you can customize your tab bar navigation.
Two days ago I needed to customize the very first preloader of a flex application (the one that is shown before finishing loading initialization classes of flex). My first impression was that it cannot be changed because I thought is something built in the Flash Player but at the end I found a way using [...]
It just hit me!! I missed one very important news for us developers from the free comunity:
Adobe has opened up AMF specification and has announced plans to release the source code of BlazeDS, a messaging and remoting framework based on LiveCycle Data Services.
More information can be found here.
One thing, among others, that Flex doesn’t have, and is important because many of its components needs XML structures, is deleting (taking out) nodes from a XML structure. This is crucial for a tree or for a menu where you need to change it dynamically. So bellow is a recursive method that will go through [...]
I don’t know if you got in trouble when working with xmls but recently I found a bug (or a feature). Some differences when using toString() and/or xmlToString().
Take a look a the following code:
public var test1:XML = new XML("
<permissions></permissions>
");
public var test2:XML =
<permissions></permissions>;
public var test3:XML = new XML("
<permissions>
<test1>test</test1>
</permissions>");
public var test4:XML =
<permissions>
[...]
The following code inverts the colors of an image and returns the inverted image as an Image object. As parameter it needs the container of the image (a canvas).
private function invertImageColor(canvas:Canvas):Image
{
var newImage:Image = new Image();
newImage.source = Image(
[...]
I was working to a flex project and I just need to make a cast to a value to int … this it’s simple … and not so.
After few hour later, I have a vision …
I just try to make a cost from a decimal value to int, and I have noticed that depends [...]
If you ever wanted to make a complex application with Flex you always asked yourself: Is the swf to big? How can I reduce it’s size?
Here are some small tips that do not relate to flex only, and one specific to flex:
One of the first questions any beginner in OOP and Flex will ask is: What do those public/protected stuff really mean?
Well here is a short table to describe them.