Home

Follow Skinkers.

Recieve all the updates from Skinkers via email:

 

Flex

0

Using the Flex Singleton register Pt 2/3 (Overriding Flex implementations)

March 8th, 2010 | AS3, Flex | Matt Bryson

This is the second in a 3 parter about the flex singleton register. This post will look at how to register your own classes with the Singleton register so you can actually use your custom implementations instead of the Flex default implementations.

Read the rest of this entry »

0

Using the Flex Singleton register Pt 1/3

March 1st, 2010 | Air, AS3, Flex | Matt Bryson

This is the first in a 3 part post about using the Flex Singleton register. This post will deal with what the Flex Singleton register is as well as how and why its used. The second will look at how to register your own classes with the Singleton register (not as easy as it sounds) and the third will be a real life example.

The final post will show you how to give the Alert control the ability to create a modal overlay that supports a custom chrome in Adobe Air. The big pain with a custom chrome (say a splat shape) is that the modal overlay covers the entire bounds of the window – including any transparent areas. So for irregular shapes/chrome – like a splat as a background, you get a big square slapped over the top – not ideal. What you want is ONLY the splat to be overlaid with the modal background.

By using the Singleton register and a custom implementation of the PopupManager we can add this functionality without having to create a custom Alert class. You don’t have to change any of your existing app code where Alerts are used, all existing calls to Alert will now have our new and improved modal background!

Read the rest of this entry »

0

Flex Effects with Pixel Bender filters, part 1.

February 28th, 2010 | AS3, Flex | David Spanton

This is the first of a two part series on using Pixel Bender filters in Flex effects. I’ve recently started to spend a bit of time with Pixel Bender and have found it to be a good tool for creating interesting effects and transitions in Flex. Even if you don’t write any yourself, there are plenty available to use at the Pixel Bender Exchange

In this first part I’ll cover an example of making an Effect and EffectInstance that extend the Flex framework and also use a Pixel Bender filter to achieve the effect. In the second part I’ll cover writing a Pixel Bender filter to use with a custom effect.

I won’t go over embedding and instantiating a filter as a Shader; this is well documented here. There is also a good example of animating a Pixel Bender filter here.

Read the rest of this entry »

0

Resize Flex Image correctly and add Bitmap smoothing

January 28th, 2010 | AS3, Bitmap, Flex, Image | Matt Bryson

If you have ever used the Flex Image component, set its minWidth / minHeight or percentWidth / percentHeight you may have noticed some strange layout issues, and that the scaled quality is not that good.

You can use 3rd party Image components to get round these issues, or this very simple load handler on the image.
Read the rest of this entry »

2

Dynamically resizing AIR windows with user resize (gripper).

January 21st, 2010 | Air, Flex | David Spanton

I am a big fan of Daniel Wabyick’s dynamically resizing window example. ( http://www.wabysabi.com/blog/2008/01/29/example-air-app-dynamically-resizing-windows-based-on-content-area/ ). A simple and elegant solution to accommodate dynamically expanding and contracting windows in an AIR application.

I’ve since extended this example to fill two extra requirements. The first of these was to add a gripper that allows users to resize the window; the focus of this article. The second was to allow the window to dynamically resize, but to keep it’s content the same, which I will cover in the future.

Read the rest of this entry »

0

Static initialisers two ways.

January 17th, 2010 | Flex | David Spanton

Static initialisers are good ways of running code for a class before any instances of it are created. Very useful for setting up things like loggers or defining default styles for custom components. Two different methods of achieving this are outlined below.

Read the rest of this entry »

1

How to use custom bitwise flags in Actionscript

January 12th, 2010 | AS3, Flex | Matt Bryson

The Alert class in AS3 is a good example of using bitwise flags to specify a configuration without having to set lots of separate Boolean flags.

Its also very easy to create bitflags for yourself, which save time, code and memory! Below is an example of custom bitflags as well as an explanation of how it all works.
Read the rest of this entry »

0

AutoComplete component sizing.

January 4th, 2010 | Flex | David Spanton

The Flex Components AutoComplete ( Link ) offers a great auto suggestion text input component, which often makes for a better experience than a combo box or list. What it didn’t do was resize quite how a wanted it to.

Read the rest of this entry »

0

SliderDataTip border skinning patch

December 7th, 2009 | Flex | David Spanton

In the previous post I discussed an issue with the SliderDataTip class’ border skinning. http://www.as3offcuts.com/?p=57

Since then I’ve submitted a fix as a patch to the Adobe bugs system. This was the first time I’d submitted a patch, so had to jump through a few hoops to get there, but it was all pretty straightforward.

Read the rest of this entry »

0

SliderDataTip border skinning fix (work in progress).

November 18th, 2009 | Flex | David Spanton

There’s a small issue with the border of the data tip in the two Flex Slider classes (VSlider and HSlider) (which I raised yesterday. https://bugs.adobe.com/jira/browse/SDK-24282)

I quickly knocked up a fix for it that could either be placed in ToolTip, SliderDataTip or in an extension to SliderDataTip.

Read the rest of this entry »