Waving Text Effect in Actionscript 3.0

var text:String       = "This text is a waving text";
var format:TextFormat = new TextFormat("Arial", 12);
var radius:int = 5;
var speed:Number = Math.PI/15;
var angle:Number =0
var letters:Array = null;

function Init():void
	letters = [];
	for (var a = 0, x = 0; a<text.length; a++)
		letters[a] = new Sprite();
		var txt:TextField =  new TextField();
		txt.selectable = false;
		txt.autoSize = "left";
		txt.text = text.charAt(a);
		letters[a].x = a * 15;
	addEventListener(Event.ENTERFRAME, Animate, false, 0, true); 


function Animate(e:Event):void
	for (var a = 0; a<letters.length; a++) 
		letters[a].y = Math.sin(angle+a)*radius;
	angle += speed;


O’Reilly’s free book: Introducing Starling

Introducing Starling

Introducing Starling

One of the reason that made me go on and learn Flash is to create games that I like. Well, in time, things got different and most of the time was spent on creating flash components for websites. Yeah, I’ve done occasionally some small flash games but never at a professional level.

A nice piece of news was when I found out that O’Reilly release a free book based on Starling Framework.

What a joy ! I’ve known about the existence of this framework but my time was too short to really got into it. So I think this is the right time to do it. I am going to wipe the dust from some of my games and try to port them to use this framework. I think this will be a great opportunity to learn some stuff. 🙂

Starling is an ActionScript 3 2D framework developed on top of the Stage3D APIs. Starling is mainly designed for game development, but could be used for many other use cases.

So, here is the link you wanted.

2011 in review

The WordPress.com stats helper monkeys prepared a 2011 annual report for this blog.

Here’s an excerpt:

A New York City subway train holds 1,200 people. This blog was viewed about 5,800 times in 2011. If it were a NYC subway train, it would take about 5 trips to carry that many people.

Click here to see the complete report.