You are currently browsing the Eric Feminella blog archives for April, 2006


Zen Doc:: JavaDoc Generator for ActionScript

I can’t begin to tell you how many projects I have worked on where there is literally NO documentation what-so-ever. And I am not without blame myself. Personally I try to avoid writting comments mixed in with my code and substitute comments with good, self explanatory naming conventions and clean code. This is good for me but someone else may not understand my code in detail. I have always liked the javadoc commenting style and even more importantly I have always been impressed with javadoc document generation.

So I did a quick search for ActionScript JavaDoc generators and found “Zen Doc”, an awesome JavaDoc Generator for ActionScript. I will begin using this personally and professionally and may possibly make it a standard for all codebase members.

Check it out at:
http://www.senocular.com/


Check out the Demo;
http://www.senocular.com/projects/ZenDoc/index.php

AJAX Desktop:: beta 1

I used to build lots of .swf’s embedded in html pages and set the html page as my desktop as oppossed to just having an image set as my desktop. This was cool because the swf would read from an xml file and add links that I can access directly from my desktop. I also had various effects and what not as well as news aggregators, clocks and an mp3 player. The only problem that I couldn’t seem to solve is that when I would try to make a selection on my desktop focus was on the .swf and not the desktop. So this was a problem.

My solution was to do the same exact thing but in AJAX rather than flash this way focus would remain on the desktop. Below is a link to the working sample as well as a link to the source files for you to use as you wish. Simply add all of your favorite images in the images folder and then modify the ajax-desktop.js file and add your images as indexes of the ‘imagesArray’. Everytime you boot up you will have a different image load randomly as your desktop. You can add links to your executables allowing you to rid yourself of desktop icons as well as links to your favorite sites.

Sample:
ajax-desktop.html

Download Source code:
ajax-desktop.zip

Cool JS and CSS View Source Firefox Extension

Every now and then I go through an extension phase where I am on a quest for the coolest Firefox extensions out there. I found about 30 new extensions that were definetely worth installing which I will post this blog once I have time to write a quick description for them all. One that is worth talking about is the “JS and CSS View source options which are added to the context menu in Firefox. This extension is pretty cool if you only want a real quick look. You can download it at http://www.scorpiondb.com/firefox/extensions/jsview/jsview1.0.7.xpi

Flex 1.5 PopUpWindowHandler

Below is a quick class that I wrote this morning for managing popup windows in mxml / Flex 1.5. It is an all static class therefor it is easily managed. All that is required is that you pass two arguments to the createPopUp method. the first argument is the scope of which the popup need be created and the second is an mxml component which should be instantiated in the popup window.

import mx.managers.PopUpManager;

class PopUpWindowHandler
{
public static var popup:MovieClip;

public static function createPopUp(target:MovieClip,
                                               classObject:Object):Void
{
  if ( popup == null )
  {
       popup = PopUpManager.createPopUp(target, classObject, false, {});
       popup.centerPopUp( scope) ;
  }

}

public static function close():Void
{
     popup.closeWindow();
     popup = null;
}

}