about 3 months ago - No comments
Handling a common event like a double click is not so simple as we may assume when it comes to Flex programming. In fact there are several critical aspects related to this event, first of all we have to set the attribute doubleClickEnabled to true in order to make our components double clickable, and this
about 5 months ago - 1 comment
Today I’m gonna show you a secret ninja technique to extract hours, minutes and seconds from a number (representing an amount of seconds). In my example I will show an Actionscript code, but this can be implemented in JavaScript and maybe other languages too. So, the scenario is the following: we have a number representing
about 12 months ago - No comments
I just faced the terrible nightmare of “Type was not found or was not a compile-time constant” error (Flex Builder) and I lost several time to figure out what the problem was. I realized that I was using the same name for MXML Application file which was already used by a class inside one of
about 1 year ago - 1 comment
Ok, let me explain my last experiment… Problem Flex’s components have a nice id property which can be used to easily referencing object created. All you know, that if I get the following mxml Application file: 123456<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:TextInput id="input1" width="300" /> </mx:Application> I can then create a Script
about 1 year ago - No comments
When we need to use a series of Actionscript classes in several projects and centralize them into a single place, the best option available is to deploy our classes as an SWC library and then add it to the “library path” under Flex Builder’s “build path” panel. Deploy an swc file To obtain an SWC
about 1 year ago - 15 comments
I was looking for an elegant solution to implement multiple filter functions on an ArrayCollection (which provides a method filterFunction() that can be assigned dynamically in order to filter data inside the collection). The first and only valid solution I found was that one from Cristian Rotundu, he has extended ArrayCollection class providing a filterFunctions
about 1 year ago - 11 comments
I was trying to set the columns of a DataGrid to a certain percentage, but I discovered that inexplicably DataGridColumn doesn’t provide percentageWidth property nor it accepts a percentage string as width property… so I did a quick search on google and I found that is sad but true and moreover the solution I found
about 1 year ago - 5 comments
In these days I played with Flex’s logging framework and I extended it to write log messages to files, both plain text .log files and dynamic HTML, CSS formatted and Javascript powered files with the ability to filter message type (debug, error, fatal and so on). The logging framework is a powerful feature that comes
about 1 year ago - 3 comments
I’ve played for a while with Flex’s library and now I’m experimenting my own custom components and I would like to share them and the knowledge necessary to build personal, reusable cool components. Fundamentally there are two ways to realize custom Flex’s components: one (and the easiest) is to create an MXML file, the second
about 1 year ago - 5 comments
I’m playing with Flex data Providers and actually I’m testing ArrayCollection. There are 3 ways to populate an Array collection: Initialize an ArrayCollection and then use its addItem() method (which accepts any Object type) Initialize an ArrayCollection, access its “embedded” Array by using the source property (ie: myArrayCollection.source) an then push objects inside this one