Archive for the ‘help’ Category
Wednesday, January 27th, 2010

Last week I found myself needing to convert a colour image to black and white and here’s how I did it!
import flash.filters.ColorMatrixFilter;
import fl.motion.AdjustColor;
//==========================
var color : AdjustColor;
var colorMatrix : ColorMatrixFilter;
var matrix : Array;
var filterBW : Array;
color = new AdjustColor();
color.brightness = 20;
color.contrast = 20;
color.hue = 0;
color.saturation = -100;
matrix = color.CalculateFinalFlatArray();
colorMatrix = new ColorMatrixFilter(matrix);
filterBW = [colorMatrix];
Now we can set the .filters property of our image to be filterBW, and shazam you have a black and white image.
Tags:as3, flash, flex, help, tutorial
Posted in as3, help, tutorial | No Comments »
Tuesday, December 22nd, 2009

I have been thinking about building a visualiser since 2003 (when I saw one on www.2advanced.com) and have finally found the time to look into AS3′s computeSpectrum as well as Richard Lords’ FLiNT Particle System and came up with this example which uses Jamie T’s – The Man’s Machine (which you can buy here).
(more…)
Tags:as3, flash, flex, FLiNT, help, tutorial
Posted in as3, help, music, tutorial | 1 Comment »
Tuesday, September 29th, 2009

You’d think that there would be a way to clear BitmapData maybe something like BitmapData.clear(), but when is anything that simple. So far the best I’ve come up with is…
(more…)
Tags:as3, flash, flex, help, tutorial
Posted in as3, help, tutorial | 2 Comments »
Thursday, July 16th, 2009

When flash is embeded within a HTML page it doesn’t by default have focus, this means it won’t capture things such as keyboard interaction. However there is a very simple fix using swfObject to embed your flash movie and a simple bit of Javascript.
Add this javascript function to your header..
(more…)
Tags:as3, flash, flex, help, HTML, Javascript, tutorial
Posted in as3, help, tutorial | No Comments »
Wednesday, June 17th, 2009

Why is it when just when you think a project is almost there some kind of nasty bug rears its ugly head, thats what happenned to me today when I uploaded my swf to the test server for the first time and tested it in the browser.
(more…)
Tags:as3, flash, flex, help, tutorial
Posted in as3, help, tutorial | 3 Comments »
Wednesday, June 10th, 2009

Last week I ran into some trouble when trying to load images dynamically in flash, 99% of the time my images loaded in as they should but at what seemed like random intervals and image would suddenly fail to appear, this was only happening in Firefox or Safari, IE has never as far as I can tell failed to load an image when I’ve been using it to test this project. At first I thought it might be a problem with the platform the site was running on however after some testing I was able to rule this out so I turned back to my trusty friend Charles the Web Debugging Proxy for some help.
(more…)
Tags:as3, flash, flex, help, tutorial
Posted in as3, help, tutorial | No Comments »
Sunday, May 17th, 2009

Always remeber to register your fonts in externally loaded SWFs is the lesson learned today, afterI loaded my project SWF into my preloader SWF and found none of my embeded fonts were appearing!!
(more…)
Tags:as3, flash, flex, help, tutorial
Posted in as3, help, tutorial | No Comments »
Friday, May 8th, 2009

Recently I came across the problem of trying to manipulate the bitmap data of an image loaded from a server which doesn’t host a crossdomain.xml ot where it doesn’t allow all domains. I tried a couple of different things to try and get round this problem most notably Martin Legris’ fix (Getting around the crossdomain.xml file when loading images in as3) but annoyingly nothing I tried would work.
(more…)
Tags:as3, flash, flex, help, PHP, security, tutorial
Posted in as3, help, tutorial | No Comments »
Saturday, August 9th, 2008

Recently I found that I needed to type check and object in actionscript 3 and didn’t have the first clue how to do it. As always google was my friend and here’s the solution I came up with.
import flash.utils.getQualifiedClassName;
//=============================
public static function checkClassType(obj:*):String
{
var nam:String = getQualifiedClassName(obj);
return nam;
}
//=============================
Tags:as3, flash, flex, help, tutorial
Posted in as3, help, tutorial | No Comments »