Author Archives: Zevan

I want Twitter

CLICK HERE TO COPY
Actionscript:

[SWF(width = 800, height=600, frameRate=15)]

 

var littleTxt:TextField = TextField(addChild(new TextField()));

with (littleTxt){

    defaultTextFormat = new TextFormat("_sans", 10);

    width = stage.stageWidth-20;

    height = stage.stageHeight-20;

    multiline = true;

    wordWrap = true;

    text ="";

    textColor = 0x444444;

    selectable = false;

    x = y = 10;

}

 

var txt:TextField = TextField(addChild(new [...]

Posted in external data, string manipulation, strings | Tagged , , , | 5 Comments

I’m Twitter Search

CLICK HERE TO COPY
Actionscript:

[SWF(width = 400, height=600, frameRate=12)]

var loader:URLLoader = new URLLoader();

var req:URLRequest = new URLRequest("http://search.twitter.com/search.atom");

var vars:URLVariables = new URLVariables();

vars.q = "I'm";

// results per page

vars.rpp = "7";

vars.page = 1;

 

req.data = vars;

req.method = URLRequestMethod.GET;

 

loader.addEventListener(Event.COMPLETE, onLoaded);

loader.load(req);

 

// check for updates every 30 seconds -

var timer:Timer = new Timer(30000);

timer.addEventListener(TimerEvent.TIMER, onTick);

timer.start();

function onTick(evt:TimerEvent):void{

    txt.htmlText = "loading...";

    loader.load(req);

}

 

var txt:TextField [...]

Posted in XML, external data | Tagged , , , | 1 Comment

Perlin Outlines

CLICK HERE TO COPY
Actionscript:

[SWF(width = 600, height=600, backgroundColor=0xCCCCCC, frameRate=24)]

var canvas:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight, false, 0x000000);

var blur:BitmapData = new BitmapData(stage.stageWidth,stage.stageHeight, false, 0x000000);

addChild(new Bitmap(canvas, "auto", true));

 

var w:int = canvas.width

var hw:int = w / 2;

var size:int = w * w;

var seed:Number = Math.random()*100;

var pnt:Point = new Point();

var dy:Number = 0, dx:Number = 0;

var blr:BlurFilter = new BlurFilter(10,10,1);

addEventListener(Event.ENTER_FRAME, [...]

Posted in BitmapData, Vector, pixel manipulation | Tagged , , | Leave a comment

Parallax fp10

CLICK HERE TO COPY
Actionscript:

[SWF(backgroundColor=0x000000, width = 800, height = 600)]

 

// this is a trick to keep the 3D texture quality up...

// try setting it right off the bat and you'll notice that the

// Shapes look pixilated

setTimeout(function():void{ stage.quality="low"}, 500);

 

var matrix:Matrix = new Matrix();

matrix.createGradientBox(600, 600, 0, -450, -450);

 

var boxNum:int = 30;

var boxes:Array = [];

for (var i:int [...]

Posted in 3D, motion | Tagged , , | 1 Comment