AS3

AS3 – Designing a new tween library

Posted in AS3, library on September 25th, 2009 by Philippe – 10 Comments

I don’t want to sound grumpy, but I never liked how more and more coders don’t seem to be able to keep things simple. Looks like nowadays you must be an architecture astronaut to be considered seriously.

One of these basic Flash things which should be kept simple is tweening – everybody needs to animate things, but I believe it should be kept as a commodity and not become fatter than your own application code.

read more »

AS3 – Parametric path drawing

Posted in AS3, geometry on June 20th, 2009 by Philippe – 1 Comment

Partial path drawing Last time I gently coded a script for “rounding” the corners of a path. I think the script is really fine, handles nicely closed paths, but, it’s “static”.

So here’s the new, innocent, question: what if you want to have an animated drawing of the path?

Innocent answer: the drawing method would need a “ratio” parameter, so you can draw only a part of the path.

read more »

AS3 – Rounding corners

Posted in AS3, geometry on May 31st, 2009 by Philippe – 3 Comments

Interactive demoA few days ago, I was with a few students from Gobelins talking about their school projects. One group was working on some trip-assistant project where they would display itineraries on a city map.

Map itineraries most of the time are painted as straight lines with square corners and so one student suggested that it would look nicer with rounded corners: easy stuff, I said, just get each segment’s direction vector, multiply by the corner radius you want and lineTo/curveTo the path.

read more »