BechBox blog

Icon

useable but exciting IT design

New site for Ditte Valente

Today we launched a new Flash site for photographer Ditte Valente. She’s very talented – check out her work and the new site at:

http://www.dittevalente.dk

A warm welcome to the new Actionscript Vector class

Adobe introduced a new Vector class in Flash Player 10 – very much like the good old vector class from C++. And it’s quite a bit faster than using arrays … pop this into a new Flash file and check out how it performs:

function testArray():Number{
var startTime:Date = new Date();
var arr:Array = new Array();
var i:int=0;
for (i=0;i<=500000;i++){
arr.push(i);
}

var sum:Number = 0;
var len:int = arr.length;
for(var j:int = 0; j < len; j++)
{
sum += arr[j];
};

return (new Date()).getTime() – startTime.getTime();
}

function testVector():Number{
var startTime:Date = new Date();
var vec:Vector.<int> = new Vector.<int>();
var i:int=0;
for (i=0;i<=500000;i++){
vec.push(i);
}

var sum:Number = 0;
var len:int = vec.length;
for(var j:int = 0; j < len; j++)
{
sum += vec[j];
};

return (new Date()).getTime() – startTime.getTime();
}

trace(“testArray: ” + testArray());
trace(“testVector: ” + testVector());

When I execute the code on my machine, the vector performs twice as fast!

Ja Film flash website

A while ago we released a full blown flash website for Aarhus based Ja Film. They make som fantastic stuff down there at Klosterport, so check out the site and their work!

www.jafilm.dk

 

March 2010
M T W T F S S
« Jan    
1234567
891011121314
15161718192021
22232425262728
293031