Category: Programming

ActionScript 2 DataGrid Cell Redraw

I’ve never really had much use for the Flash DataGrid until a recent project. One of the tasks involved updating a field of a certain row. I was doing it like: this.datagrid_clinicians.dataProvider[clinician_index].total_presentations–; Essentially, there is an array of objects. One of the object properties is called “total_presentations”. The above line tell a specific DataGrid row […]

IE8 Font-Family Crapiness

I installed IE8 last night, had to do a manual download as it hasn’t shown up in Windows Update yet. Seems ok, took a while to get used to the slight change in tab styling. So everything’s going hunky dory until I landed on a Wikipedia page. It was being rendered with some crazy font […]

Update Flash IDE Player

Everyone knows that to update your browsers Flash player you just need to visit the Adobe site and follow the “Get Flash” links. Pretty simple stuff, however doing this does not update the Player that the IDE uses, which is the same one used when you open a swf on its own off your HDD. […]

ActionScript 3 Random Color

I wanted to test something with different colors, turns out it’s easy to pick a random color: var box:Shape = new Shape(); var random_color:Number = <strong>Math.random() * 0xffffff;</strong> box.graphics.beginFill(random_color, 1); box.graphics.drawRect(0, 0, 100, 100); box.graphics.endFill(); this.addChild(box);

ActionScript 3 Greyscale

Just had to desaturate a clip and then return it to normal. Code wise it’s rather simple, the following turns a MovieClip with an instance name of test to grey: // Make Grey var r:Number=0.212671; var g:Number=0.715160; var b:Number=0.072169; var matrix:Array = []; matrix = matrix.concat([r, g, b, 0, 0]);// red matrix = matrix.concat([r, g, […]