All Posts in Flex

May 9, 2013 - 2 comments

Flash Builder 4.7 Crashes on Startup

A little issue I seem to bump into every now and then so made sense to write a quick post about. Sometimes I find when I open up Flash Builder it will load the workbench then show me the full program for a split second before crashing. Simple fix is to move the .metadata file out of the workspace to let me open up the application again. On a mac you'll find it in Documents/Adobe Flash Builder 4.7.

January 3, 2012 - No Comments!

Code Snippet – Get Day in Year

Small code snippet that calculates the number of the selected day in the overall year (e.g. 1st Feb is the 32nd day of the year).

function getDayInYear(day:int,month:int,year:int):int
{
var day:int = day;
var month:int = month;
var year:int = year;
var dias:Array = [31,28,31,30,31,30,31,31,30,31,30];
if(year%4 == 0 && month > 1)
day++;
for(var i:int = 0;i < month;i++) day+=dias[i]; return day; }

April 4, 2011 - No Comments!

2011… Year to be a Flash Dev with some emerging technology… Thank you Apple

Over the last couple of weeks I've had some free time on my hands and wanted to see what was going on in the Flash community of late. It seems like the guys on the Adobe Evangelist team have got it right when they said the year would be a good one for Flash devs (not that any of us were sweating right!). With lots of cool projects on the Flash horizon I thought I'd put together a quick post on some interesting projects I'd been able to play with and those I'd seen on the radar.

Read more

March 21, 2011 - 1 comment.

Root content is missing from package

With the release of Air 2.6 today I decided to venture back into the world of Air for IOS development just to see how good the improvements were. Using the Air SDK and my Ant scripts I ran into an issue when trying to compile my swf for IOS. The compiler was returning the following error...

Root content FlashIOS.swf is missing from package

Read more

December 11, 2010 - No Comments!

TypeError: Error #1006: value is not a function

A small issue that came up in my debugger today, where the following error was triggered by a Rich Text Editor.

TypeError: Error #1006: value is not a function.
at mx.controls::RichTextEditor/setComboSelection()
at mx.controls::RichTextEditor/getTextStyles()
at mx.controls::RichTextEditor/systemManager_mouseUpHandler()

The error is due to the way the font size drop down is set. We are able to set the values of the drop down via the following method.

richTextEditorInstance.fontSizeArray = [10, 20, 30];

However this format will create the error as the component is expecting a string based array, so to fix our issue we would declare our array as...

richTextEditorInstance.fontSizeArray = ["10", "20", "30"];

December 6, 2010 - No Comments!

Scale Bitmap with BitmapData and Matrix

Ran into small issue this morning where I needed to scale a bitmap. This was a shot of another movieclip, problem is if you scale the displayobject before taking your shot through bitmapData it doesn't scale the contents you are taking a shot of. In order to get round the issue we use the Matrix class... example code below.

Read more