Loading AS2 swfs as AS3 swf using ForcibleLoader.

July 30th, 2010 by Dave

This is a quick post to recommend using Spark projects ForcibleLoader (available here) class if you’re ever in the situation of needing to load an old AS2 swf (that you probably have no source to) as an AS3 swf within an AS3 project.

Read the rest of this entry »

Bookmark and Share

Swiz in Actionscript Projects (including Flash IDE projects)

June 3rd, 2010 by Dave

I’ve been spending a bit of time with Swiz 1.0 and thought I would see how easy it was to get it working with actionscript projects. Most of the documentation focuses on how to configure Swiz in Flex 3 and 4, but not how to do so in pure actionscript.

Turns out its actually pretty easy: either in Flex Builder or the Flash IDE. The only caveat to it being truely pure actionscript is that you need to use Flex’s framework.swc in order to let Swiz use data binding, and rpc.swc to use some of Swiz’s service classes.

Read the rest of this entry »

Bookmark and Share

Swiz, Degrafa and YouTube Demo Application.

May 13th, 2010 by Dave

Here’s a little demonstration application I recently put together using a combination of Flex, Swiz, Degrafa and the YouTube API.

You can see the application and view/download the source here: http://www.davespanton.com/demo/TubeDemo.html

Read the rest of this entry »

Bookmark and Share

Flex Effects with Pixel Bender filters, part 2.

March 21st, 2010 by Dave

This is the second part of a series on using Pixel Bender to create effects in Flex. In this part I’ll go through making a simple filter in Pixel Bender that can be used to animate an effect in a similar way to the last post.

You can get hold of a copy of the Pixel Bender toolkit here and also get hold of a lot of good reading material to get started using it.

Read the rest of this entry »

Bookmark and Share

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

March 8th, 2010 by Mattb

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 »

Bookmark and Share

Using the Flex Singleton register Pt 1/3

March 1st, 2010 by Mattb

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 »

Bookmark and Share

Flex Effects with Pixel Bender filters, part 1.

February 28th, 2010 by Dave

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 »

Bookmark and Share

Dynamically resizing AIR windows with non-resizing content.

February 5th, 2010 by Dave

Following on from my previous post concerning dyncamically resizing AIR windows with user resize (based on Daniel Wabyick’s example here), I wanted to cover a further modification I made; that of having the window resize dynamically, but the content stay the same.

To be more specific, I wanted a content area to remain a fixed size when the window resized dynamically, but maintain a percentage width of the area when the window was resized by the user. (If that makes no sense, download the example after the jump.)

Read the rest of this entry »

Bookmark and Share

Resize Flex Image correctly and add Bitmap smoothing

January 28th, 2010 by Mattb

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 »

Bookmark and Share

Dynamically resizing AIR windows with user resize (gripper).

January 21st, 2010 by Dave

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 »

Bookmark and Share