Archive for January 2011

Diagonal line filled box with ActionScript3

diagonal-line-filled-box

Just a very quick post about a potentially useful code snippet that I recently wrote in ActionScript. I discovered, after attempting to Google my way through a small bit of development, that I couldn’t find the exact solution I was looking for.

I was attempting to find some code for making a rectangle using the AS3 graphics API which is filled with a background colour and some diagonal lines (illustrated above by the green and blue boxes). Fairly straightforward one would assume however most of the examples I found involved drawing the lines and using a mask to create the rectangular shape. Considering the overhead of using masks in Flash and the fact that within my application this box will be being rendered extremely regularly to simulate movement I decided to write a little utility using only the graphics API and some GCSE maths.

The code won’t format properly in the blog so I’ve uploaded the entire DrawingUtil.as class for download here.

Rob Has Arrived!

Rob Squires and Gareth Foote

We are pleased to announce that Rob has finally made it to the UVd fold, unharmed from Christmas over-indulgence and raring to get cracking on several of our more pressing projects. Rob has come from IBM after successfully navigating their graduate programme and is fully versed in everything LAMP. Just for the record, he is the first of the UVd crew to choose Ubuntu as his operating system of choice for his desktop (choice is good right?).

Rob has worked his way into the UVd circle of trust this week and has earned himself a) Office keys and b) Black n’ Red hardback notebook. He almost shed tear at receiving the latter.

Search