Archive for April, 2006

Cool JS and CSS View Source Firefox Extension

Wednesday, April 12th, 2006

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

Wednesday, April 5th, 2006

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;
}

}