Away3D and alpha:0… a no-go

On November 2, 2009, Flash - No Comments

Today, I’ve spent the entire morning fixing a strange error in a Flash Project with Away3D. Every now and then, it would give me the following error: Error #2007: Parameter bitmap must be non-null. It would give the error when calling the render function of the view.
The strange thing is that it would never give the error when running in debug mode, making it very hard to find the cause of the error. Eventually, I found that Away3D is not very fond of objects with alpha set to 0. Setting it to 0.01 made all the errors magically disappear. For me, this is fine, but I can imagine scenario’s where this is not a suitable work-around, so I’ve also reported it to the away3d devvers.

AIR + Chuck Norris = Chuck Norris Facts Desktop app

On October 7, 2008, Air,Flash - 8 Comments

Today, I fiddled a bit with Adobe AIR (Adobe Integrated Runtime) in Flash CS3, and look here, I’ve created the best application ever! (Every application featuring Chuck Norris is the best application ever).

It serves random facts and roundhouse kicks you in the face! Check it out:

Get Adobe Flash player

3D Text with Away3D

On October 3, 2008, Flash,Flex - 7 Comments

The other day, I was playing with the away 3D engine and I discovered that you can have 3D text. It’s really cool, look at this:

Cool huh? You can change the text by altering the text in the input field (topleft corner). I’ll be tweaking this little thingy a bit further to increase the performance.

Check out this amazing Away3D demo!

On September 29, 2008, Flash,Flex - 1 Comment

Fabrice, our mad french scientist @ TFE just released this fabulous demo of their 3D engine. Way to go, Fab-man!

Check it out here: http://www.closier.nl/blog/?p=77

Now Available: ASDebugger 2.1

On , Components,Flash,Flex - 4 Comments

I’ve just released ASDebugger version 2.1. Some minor bugs are fixed, like:

  • You can now edit any movieclip from the displaylist, not just the deepest ones
  • Copy all to clipboard now works as expected
  • Scrolling a numeric stepper only scrolls the stepper, not the tree
  • It’s now possible to close root nodes
  • The console scrolls with the content

And some features are added:

  • Copy an object as JSON string (only works for simple / small objects)
  • Re-added legacy support for our old (in-house) TFEDebugger

For this update you need to update both the SWC and the SWF / EXE file! But there’s backwards compatibility both ways.

And it’s available at the project page, now.

ASDebugger 2.0: A real-time debugger and editor

On September 16, 2008, Components,Flash,Flex - 6 Comments

Yeah! It’s here, the long awaited update for my debugger. And since I’ve added a lot of new functionality, I decided to raise the major version number (easy decision to make when you’re the only developer on the project :-P ). So, what does it do? Well, a small list:

  • Send traces / strings
  • Inspect objects, movieclips, displayobjects and alter their values.
  • Browse through the displaylist of any (flex or flash) application. more…

ASDebugger: A run-time debugger for AS3 Projects

On July 2, 2008, Components,Flash,Flex - 1 Comment

When you’re developing an Actionscript project – Flash or Flex – you cannot live without a decent debugger. Flex provides quite a good debugger and the Flash IDE has also a reasonable debugger. The problem with those debuggers is that you have to build explicitly for the debugger. So when you’re deploying on a remote server, you don’t have those debug options.

The ASDebugger allows you to trace variables. It has support for strings, integers, arrays, dates, arraycollections, objects and everything in between.

Usage is simple, import the asdebug.as class in your application and call the debugger:

?View Code ACTIONSCRIPT
import nl.flplibrary.debug.ASDebugger;
import mx.collections.ArrayCollection;	
 
private function simpleDebug():void {
	ASDebugger.debug("<b>test</b>");
}
 
private function advancedDebug():void {
	var o:Object = new Object();
	o.my_string = "<i>string</i>";
	o.my_number = 123.456;
	o.my_int = parseInt("1");
	o.my_array = ["item 1", "item 2", "item 3"];
	o.my_arraycollection = new ArrayCollection([{label:"item 1", data: 1},
												{label:"item 2", data: 2},
												{label:"item 3", data: 3}]);
	o.my_object = {	label1:"item 1", data1: 1,
					label2:"<i>item 2</i>", data2: 2,
					label3:"item 3", data3: 3};
	o.my_date = new Date();
	o.my_xml = new XML();
	o.recurse = o;
 
	ASDebugger.debug_prop(o);
}

Before running the application, startup the ASDebugger. The ASDebugger comes in different flavors:

  • In a .exe projector file;
  • In a .swf;
  • As an AIR application;
  • or you can even use the ASDebugger on this page! more…

Compiling Flash Files from Flex

On May 20, 2008, Flash / Flex - 25 Comments

This week, I had to do some flash work for TFE. As soon as a fired up flash and started programming I realized how lazy you get when programming in eclipse. I mean, auto import, code completion, all kinds of shortcuts… Compared to the flash IDE it’s heaven :D . Now, I know that there are many IDE’s for flash Actionscript like SePY and FlashDevelop, but none of them really satisfies me like Eclipse does. The only problem with using Eclipse as Actionscript editor is the fact that you cannot build fla files in Flex Builder… or can you? more…

Learn math with flash, flex or javascript!

On December 20, 2007, Flash / Flex - 1 Comment

Flex / Flash has a neat feature: doing math for you.

So when you want to know what 0.1 + 0.2 is, you don’t need your calculator, just use flex. The result: 0.30000000000000004.

WTF is that about?

I’m currently trying to find out a fix for this. ATM the only workaround is doing a

?View Code ACTIONSCRIPT
var x:Number = 0.1 + 0.2
Math.round(x*10) / 10

How hard is it to add to two numbers and give the correct result?

or of course

?View Code ACTIONSCRIPT
var x:Number = (0.1 + 0.2).toFixed(1)

Works for actionscript as well as JavaScript

By the way, it’s not only 0.3 which is causing problems. more…