Quantcast Flex | The Danosphere.

The Danosphere.

Avatar

class TheDanosphere extends Dan implements Blog

Removing Flex Data Visualization Watermark Flex 3 to Flash Builder 4

Ran across an interesting problem last night that had me almost tearing my hair out, so I though I’d share to save others the pain. I have a fully licensed version of both Flex 3 Professional and Flash Builder 4 Professional on my machine. When compiling an old Flex 3 project which uses the “Data Visualization” components it suddenly had this ugly watermark on it!

For those of you who don’t know, this is the watermark shown when you are using beta or trial versions of the IDE with the DV components. Anyway, I had to get rid of this stupid watermark so I decided to do some googling. I applied the fixes outlined in this article to flex-config.xml and license.properties but the watermark was still showing! It was driving me crazy, literally. You know what the problem was? Flash Builder 4. Take a look at the license.properties file (located in C:\ProgramData\Adobe\Flex on Win7 machines) and you will see that it contains license information for both Flex Builder 3 and for Flash Builder 4. In order to remove the watermark when compiling the DV components through Flex 3 on a machine with Flash Builder 4 also installed, you must edit the license.properties file and remove all references to Flash Builder 4.


After you have corrected the file, compile the app that uses the DV components [in Flex3] and voila! No watermark. Keep in mind that every time you launch Flash Builder 4 it will re-insert its license information into the license.properties file, thereby restoring the watermark in your future Flex 3 compilations unless you edit the license.properties file again. Hope this helps some people!

Using the Flex 3 Logging API

Using the Flex 3 logging API is not really cut and dry. It is made to be rather extensible and flexible but at the same time it manages to be completely painful and hard to understand. The Log, ILogger, LogLogger, TraceTarget, LogEvent and LogEvent level classes and be rather cumbersome.

An example of a straight up ‘log write’ would be:

var mylog:ILogger = Log.getLogger("my.package.MyClassName");
if(Log.isDebug()){
     mylog.debug("Hello from the logger");
}

This would get you [DEBUG] level output with the message “Hello from the logger”. The problem with this approach is that I wanted to be able to log from any class, without having to create ILogger instances in all classes. I also wanted the logging to be dynamic so I could hide the class package if I wanted, I also wanted the LogEvents to carry all the information that the actual ‘log write’ contained.

So I created CustomLogger and CustomLogEvent classes that are built on the pre-existing logging API. This simple goal of these classes is to make logging easier. Now you can directly call:

CustomLogger.debug("Hello from the custom_logger");

or you can access it with a Singleton instance:

var log:CustomLogger = CustomLogger.getInstance();
log.debug("Hello from the custom_logger");

So thats all good and well but how does this make things easier? By using the CustomLogger you now have FULL control over the log messages as opposed to handing them off to a Flex ILogger/LogLogger and letting it do what it will with the log messages. Also, you do not need to instantiate a new ILogger for every class that wants to write log output. Additionally the expanded CustomLogEvent class gives whatever is listening the full rundown on what is happening in terms of logging as opposed to just a glimpse.

Here is an example that shows how useful the new CustomLogger/CustomLogEvent classes are especially when it comes to directing log output to a different target (in this case, a List component).

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Flex Tooltip Text and Tooltip ComboBox Components

Been a while since a tech-related post so I thought I’d stop by and drop a new one in the box. Recently at work there was a need for tooltip-based text and combobox components for our latest Flex project. Although flex provides some pretty solid tooltip support for Labels, their implementation on other components is a little weak. I took the time to extend the base Flex components to allow Text and ComboBoxes to have some enhanced tooltip support, check out the result below. If people need these I’d be happy to share, just post in the comments.

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

AS2 versus AS3, or “Why AS3 is awesome”…

Life has been a little crazy balancing taking so many credit hours [20], wrapping up my final quarter at RIT, my day job, TCBN, and keeping my blog up to date but its almost 1am and I finally have time to post!

I found these pretty cool “load test” flash movies [a while ago] that serve as an awesome example of how much more efficient actionscript 3 is over actionscript 2. I am currently a huge AS2 junkie, but with my recent coursework in Flex and current project in AS3 based flash, I am getting more and more fond of it. There are some differences from AS2, don’t expect a point and click transition from one version of actionscript to the other. If you are familiar with object-oriented design in AS2 the move is nearly painless (off the top of my head: Document class, event handlers, and * var type [yes, *]).

Flash is here to stay, and it’s good to see that the language that powers it is maturing as well.

* Only run one load test at a time for accurate results

Web App: College Career Course Manager

I recently took a course in Rich Internet Application development which focused on the snazzy new Adobe Flex 2 (now Flex 3) platform. This was an amazing course because Flex is being hyped up as the next big thing in RIA development because it runs in the highly pervasive Flash Player plugin (booyah silverlight!). The structure for the course was a rigorous 10week development session in which we would conceive, design, and develop a Flex application and integrate it with some type of stateful data storage.

As usual I wanted to develop something useful, and something that would allow me to integrate Flex with a technology that would be used in the real world- so I opted to integrate it with PHP and MYSQL. Even though this part of it wasn’t required, I felt it really made the experience that much more useful.

Check it out: Flex Course Manager

Responsibilities: All design, development, and backend

|

What's Here?