Some time ago, in a previous article I presented you ImageRail component that displays some thumbnails with possibility to scroll to left or right. Now we will add some new features that were missing.
Click Event - imageClick
Styles - imageBackgroundAlpha
HandCursor
Click event will be triggered when there is a click on an image, more precisely, on the […]
Popularity: 85%
What I mean in the title is this: having a data grid with a column containing some priorities (like: urgent, normal, high) among other columns, you want to sort by this priority column, but you notice that is not sorted by its importance but alphabetically. To make it crystal clear follow the example bellow…
Having the […]
Popularity: 56%
Using events is fun in MXML components is fun and easily you can specify events using Event meta tag inside the component like this:
<mx:Metadata>
[Event(name=”myevent”, type=”com.MyEvent”)]
</mx:Metadata>
The following lines defines the myevent attribute of the component like this:
<com:FramedImage x="10" y="10" myevent="handleMyEvent(event)" … />
FramedImage component is a custom component which displays a framed image.
For […]
Popularity: 62%
In this article I’ll present a new component I built: ImageRail. This MXML component will display a series of thumbnails having the possibility to scroll them horizontally.
Parameters:
paths: an array containing URLs to images
images: an array containing image objects
imagesToShow: an unsigned integer that specifies the number of images displayed at a time - deafult is […]
Popularity: 93%
In the previous articles in this series I explained how to create a horizontally and vertically resizable canvas. In this third article we will add the possibility to resize in both direction by dragging the right bottom corner.
What we will do:
add the new UI control (the right bottom button)
create the necessary events for it
create CSS […]
Popularity: 67%
In this post we will implement a login process with remember password functionality. In AS3 and also in AS2 we can use a SharedObject to store data on the users browser. Shared objects are similar to the all known browser cookies but are managed by the flash player. Shared objects can store data also remotely […]
Popularity: 78%
If you use Combo boxes to display options in some cases you may want to display options that are containing more than a few words. Maybe you want to know how a user arrived on your flex application and you want him to select from some complex options, but in the same time you don’t […]
Popularity: 53%
In the previous article I explained how to create a horizontally resizable canvas. In this second part we will implement also the vertical resize functionality.
Taking into account that we have the previous article to implement this new functionality will not be a hassle. All we have to do is to duplicate some UIs, methods, events […]
Popularity: 64%
Yesterday I started to implement a new control: Resizable Canvas. A very interesting task which needed some thinking because there are more than one ways to achieve this.
My implementation is based on a canvas that includes a reskined button as the right edge of the canvas for dragging. The canvas will be resized when the […]
Popularity: 56%
Flex is a very powerful instrument but needs to be learned and studied. Some time ago I got into a bug - that is what I thought at the first impression - but is not. I talking about the MouseEvent.CLICK event which is triggered also by the KeyboardEvent.SPACE.
Please try the following example and you’ll understand […]
Popularity: 62%
Programmers with PHP background may miss some great functions that would make programmers life much easier (nl2br in PHP). Working with HTML in Flex is a big task and as you found in the previous article more functions are needed to process HTML strings.
In this article a simple function will transform any new line to […]
Popularity: 43%
Lately I’ve been working with Rich Text Editor so I found that I need more than what RTE offers. Recently I needed a function to strip HTML tags. If you have a PHP background you can remember the strip_tags function from PHP4 and PHP5 where you could strip all HTML tags but the ones you […]
Popularity: 49%
In the previous article I came out with a function that calculates the position of the cursor in the htmlText which is different than the position in the normal text. Rick draw my attention in his comments to some flaws which are correct: the & and other similar special chars are not counted correctly and […]
Popularity: 78%
Last task I finished was something linked with templates. I needed to create a simple template engine where adding a field was a necessity. I started using RichTextEditor which is based on a TextArea so it implements htmlText property. That is an easy way having all that nice functionalities like bold, italic, font choosing, color […]
Popularity: 68%
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 […]
Popularity: 62%