Hey everyone! I’ve been on leave but wanted to post a lil update here. Code samples should be up this weekend, along with a more complete version of the “AS3 Node Network” complete with XML saving.
I also have a pretty awesome BitmapData writeup coming that really stretches the limits of Flash and Bitmaps, including an optimized Async JPEG Encoder- which allows you to encode JPEGs 4x faster than the default adobe lib, and also allows you to monitor progress of the process and merge multiple BitmapData objects seamlessly.
So what I’m trying to say is good stuff is coming, so stick around! Hoping to post this stuff over a series of posts, the first of which should be up tomorrow til then…
Hey guys, I haven’t forgotten you!! Sorry it is taking me so long to post the code examples [node network, tooltip flex components] but I have been super busy. As soon as this new site I’ve been working on [for months and months] is done and released [late May] I will be posting up all the code examples people have been requesting and will be more than happy help guide you through them should you require assistance!
Until then please accept my apologies, I know it’s been a while but I haven’t forgotten. For the time being I must focus my resources [time] on getting this new site live/to market, once that’s done the code postings will be the very next thing I do, promise!
Here is a recent code snippet I wrote to draw dashed lines in Actionscript (I am using it in Flex). Very cool. I’m displaying it using the new “Snipt Embed” functionality from Snipt.org, pretty neat!
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:
varlog: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).
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.
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
Wow, the size of navy's intranet is second only to the internet - HP Holds Navy Network âHostageâ for $3.3 Billion http://gizmo.do/93Rs8B...2010/09/01
hahah is it just me or does the google "priority inbox" promo music sound like star wars cantina? http://t.co/MEKIeuN...2010/08/31