Viewing by month: February 2009

I needed a few different size play buttons to show up over an image and using transparent GIF images resulted in uglyness. So to throw another component in my tool box I wrote "PlayButton". If you need a play button to show up on a mouse over this could be a a nice clean component to throw in there. Configurbility includes background color & alpha, play button color & alpha as well as fadein/fadeout effect settings. The "background" and play button are configured seperatly so you can have a small play button in the center of a very large masked area if you desire.

private function getPlayButton(target:DisplayObject, buttonWidth:int):PlayButton {
    var btn:PlayButton = new PlayButton(true, 0xFFFFFF, 0.45, 0xFF0000, 0.85);
    btn.width = target.width;
    btn.height = target.height;
    btn.playButtonWidth = buttonWidth;
    return btn;
}

In my example above I only set the playButtonWidth and not the height because the button by default will scale upon the setting of either width or height. You can turn this off with a simple "btn.scaleButtonOnResize = false".

Download the latest version of PlayButton (source code & example)
Read the full post to see the example app on screen

My new AdvancedImage component takes a few seperate and common needs for an image and rolls it into one nice package. AdvancedImage will allow you to easily define rounded corners (seperatly), pass in a rollover DisplayObject and will even handle cross-dissolves. I needed to provide this component to someone newer to Flex so I tried to makes it's use as simple as possible.

<graphics:AdvancedImage
    id="myExample"
    width="150"
    height="170"
    topRightCornerRadius="8"
    bottomRightCornerRadius="8"
    source="assets/waterfall.jpg"
    crossOverEffect="{createCOE()}"
    mouseOverObject="{getMouseOverMask()}"
/>

  • crossOverEffect is the effect you wish to use when changing images. when you update myExample.source, if an effect has been defined it will use that method to display the new image on top of the old one. Otherwise myExample.source = "newImage.jpg" will work just like a regular Image component.
  • mouseOverObject is just that. If you pass in a displayObject, on mouse over, that object will be enlarges to the same size as the image and displayed. In my code example I'm just using a simple white canvas with alpha set to 0.46. This is a simpler than expected example of a mouseOverObject.
  • The corner radiuses are applied via a top level Canvas, AdvancedImage actualy extends Canvas, not Image. So any images or mouse overs you pass in will be masked.

Download the latest version of AdvancedImage
Read the full post to see the example app on screen

Almost a year ago I first released my ColdFusion to Confluence Gateway (read about Confluence here). Since then my use of the API spread into several applications. Not only have my requirements grown, but I found several ways to do things better. Notably from my last public version, connection state management/knowledge is significanly better.

Some new hooks include: exportSpace, getPagesOrdered (by space), getDescendents, searchSpace

Download The Latest Version Of The Coldfusion to Confluence Gateway

Over the last couple of nights I wrote two Flex components that I wanted to share with the rest of the world. However when I went to write my blog post and add in my code for the flash it obviously didn't show up in my WIZYWIG view and I was unhappy with its representation. Their is a plugin for TinyMCE, but I didn't want to fool around with editing base Mango file. So instead I wrote this little plugin that will parse out a simple line of code and replace it with all you need.

^flash source="{path to swf}" width="200" height="180" backgroundColor="#FFFFFF" quality="high" scriptAccess="sameDomain" /^

Download the latest Version of Flash Showcase

On Feb 10th 2009 the house voted 100% (not counting no-votes) to allow a 48 hour breathing period for supplemental appropriations (the stimulus bill) in order to give the public a chance to read/understand and voice back on bills [11]. At 10pm on Thursday Feb 12th, the final stimulus package was made available to the public via their website in PDF format [13]. At 2:24pm the next day on 2/13/09, congress started voting, resulting in a 246/183 final tally in favor of the stimulus package; this was done without a single Republican vote and 7 descending Democrats [12].