Posted on June 15th, 2010 by Erland – Be the first to comment
So your client wants her data in Excel format? Not to worry. After reading this, you will be able to deliver data to her in a matter of minutes. Having said that, please bear in mind that it is not a generic solution for delivering dynamic Excel spreadsheets, merely a quick-fix solution.
But, you knew that already, didn’t you? Please read on for the good stuff…
read more »
Tags: excel, export, php, recipe, symfony
Posted on April 26th, 2010 by Thomas H – Be the first to comment
While doing a recent project I wanted to create a fade effect that worked well with the 8bit style design of the application. I wanted to use the dissolve effect, and lo and behold, flash has that function built in to the BitmapData class ( pixelDissolve ). Only problem was that the dissolve is on a pixel to pixel basis, so it did not look really authentic to a 8bit based graphics. All that was needed to do was to mimic the pixelDissolve function but apply them to squares of pixels.
read more »
Tags: 8bit, AS3, dissolve
Posted on April 21st, 2010 by hp. – 2 Comments
use a go style iota operator:
package rendering {
public class RenderFlags {
private static var _i:uint;
private static function get iota():uint { return _i++; }
public static const GENERIC:uint = 0x1<<iota;
public static const DIMENSIONS:uint = 0x1<<iota;
public static const POSITION:uint = 0x1<<iota;
public static const SCALE:uint = 0x1<<iota;
public static const CHILDREN:uint = 0x1<<iota;
public static const BOUNDS:uint = DIMENSIONS | POSITION;
public static const ALL:uint = ~ 0x0;
}
}
Tags: AS3, Snippet
Posted on April 14th, 2010 by Pål – Be the first to comment
Check out this test, benchmarking a particle system with “HTML/Browser” against Flash. Seems like Flash still has the upper hand in pure animation power:
http://www.themaninblue.com/writing/perspective/2010/03/22
Is the only hope IE9? HW/GPU is needed to kick some ass here…
Also check out this test, done on the Google Nexus One.
http://vimeo.com/10553088
Tags: Flash HTML5
Posted on February 2nd, 2010 by Pål – 1 Comment
In the middle of all the “Flash on the iPad” controversy, it can be a little soothing to watch this video demoing apps built with upcoming Flash CS5.
http://theflashblog.com/?p=1737
Tags: Flash iPhone
Posted on January 18th, 2010 by Thomas H – 2 Comments
Use your favourite tween engine and tween a property like so:
public function get burn() : Number {
return _burn;
}
public function set burn(value:Number) : void {
_burn = value;
var CF:Array = [1,0,0,0,255*_burn,
0,1,0,0,255*_burn,
0,0,1,0,255*_burn,
0,0,0,1,255*_burn];
filters = [new ColorMatrixFilter(CF.concat())];
}
Posted on January 12th, 2010 by hp. – Be the first to comment
For an introduction on the issue, check the old post Flash 9 for banner-ads (in norwegian).
Download the source files.
Most recent browsers support both navigateToURL and ExternalInterface. However, successful calls to the js-function do not return “YES” nor “NO” but null, causing the navigateToURL method to be called as well.
function openWindowAutoHandler(event:Event):void {
if (externalInterfaceAvailable) {
var openEIresult:String = ExternalInterface.call('function() {return (window.open("' + (clickTAG) + '", "_blank", "") ? "YES" : "NO") }');
}
if ((!externalInterfaceAvailable) || (openEIresult != "YES") || (userAgentString.indexOf("Opera") != -1)) {
navigateToURL(new URLRequest(clickTAG), "_blank");
}
}
openEIresult in Internet Explorer 7.0: null (Loads the URL twice)
openEIresult in Internet Explorer 8.0: null (Loads the URL twice)
openEIresult in Firefox 3.5.6: “YES” (Works as intended)
openEIresult in Opera 10.10: “YES” (Loads the URL twice, caused by third test)
Anyone think of a clever fix to the dual dual loads issue, while still retaining compatibility with older browsers?
Tags: AS3, Flash
Posted on December 21st, 2009 by Thomas H – Be the first to comment
This odd tool overlays a browser size graph over your site of choice to show how big part of the page is actually seen by how many percent of users. This is based on statistics collected by google. The tool has its obvious limitations but what’s good about it I think is that it bases the graph on browser window sizes and not screen sizes. This takes ito account browser toolbars, windows toolbars and the fact that not all have maximized the browser window.
Check out more here
Posted on December 17th, 2009 by Pål – 2 Comments
Lee runs through a couple of the new features on the new Flash CS5. I like the new font embedding and the .XFL format.
http://gotoandlearn.com/play?id=118
Also check out this on iPhone development with CS5
http://gotoandlearn.com/play?id=116
Tags: cs5, Flash
Posted on December 7th, 2009 by hp. – 2 Comments
package views.shapes {
import flash.events.Event;
import flash.display.Shape;
public class Ngon extends Shape {
protected function redraw():void {
var r:Number = radius;
var a:Number = angle;
var s:Number = Math.PI*2/sides;
graphics.clear();
graphics.beginFill(color,1);
for (var i:uint = 0; i<=sides; ++i) {
graphics.lineTo(r*Math.cos(a+s*i),r*Math.sin(a+s*i));
}
}
private var _sides:uint = 3;
public function get sides():uint { return _sides; }
public function set sides(value:uint):void {
if (value !== _sides) {
_sides = value;
redraw();
}
}
private var _color:uint = 0x0;
public function get color():uint { return _color; }
public function set color(value:uint):void {
if (value !== _color) {
_color = value;
redraw()
}
}
private var _radius:Number;
public function get radius():Number { return _radius; }
public function set radius(value:Number):void {
if (value !== _radius) {
_radius = value;
redraw();
}
}
private var _angle:Number;
public function get angle():Number { return _angle; }
public function set angle(value:Number):void {
if (value !== _angle) {
_angle = value;
redraw();
}
}
}
}
Tags: AS3, geometry, math