Saturday 30 May 2009

Tweens in Flex

I came across a problem I've had before with Flex yesterday. Sometimes Tweens (and anything that relies on a Tween such as a Move or a Resize) just doesn't work. You call play() but you don't get any events from the Tween, not even a tweenStart event.

On another project I had this problem and had to write my own Tween which I called WorkingTween. I had to re-implement it yesterday.

I think it is a better implementation anyway as it just uses event listeners, you don't have to supply a listener object and you don't have to implement tweenUpdate and tweenEnd method (which you have to make public when using Tween).

My Tween you supply a startValue, endValue, duration and optionally interval and easingFunction. You then add listeners to the standard TweenEvent - tweenStart, tweenUpdate and tweenEnd.

Has anyone else had trouble with the standard Tween?


I jsut came across these people:

and they've done some very cool stuff with 3d in Flash. Go and take a look.

Sunday 24 May 2009


I’ve not posted in a while as I’ve had very little time to work on any projects outside of work.

I’m currently working on a project I am calling FlexBudget whenever I can squeeze a few hours coding in at home.

I hope to run this off a Google App Engine Backend which will be interesting to play with.

The app will enable you to set up a number of accounts, tell it about you Direct Debits and other outgoings and about any incoming funds. It will allow you to see when your account is going to go overdrawn and let you plan when and what to spend. You’ll be able to enter recurring transactions and one offs.

Eventually I want to be able to upload a CSV file taken directly from your online banking to it and let the app find your direct debits and work out how much you spend in a normal month.

So far I have defined the main domain models – Account, Transaction and AccountAdjustment and have written the unit tests and functionality for Account. This project is well suited to TDD so that is the approach I am using.

The app will basically be one big data grid. The dataProvider will be a collection of Transactions. Each transaction will contain at least 1 account adjustment (2 for a transfer for example as it involves 2 accounts). Each account will have a collection of AccountAdjustments passed into it and will calculate the balance of each. The Transactions will then use this calculated balance to render the data grid.

I’ll find this app useful in planning weekends away to track days and other car – related holidays. They’re not cheap so being able to see how much money you’ll have left at the end of the month after 4 weekends away is useful!

I’ll keep you updated as I go along.