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.

Update Time! Next Up: ASDebugger 2.2

On May 3, 2009, Flash, Flex - No Comments

I’ve updated the ASDebugger. Not much news here, I only implemented an updated (less buggy) version of the FlpTree. You can download the debugger on the project page.

Vote against new Flash Player security measures!

On November 18, 2008, Flash, Flex - 5 Comments

Not too long ago, Adobe launched Flash Player 10. Hooray, party! But not everything is well in this new flashplayer. I believe this is the first flash player which actually breaks old flash apps. This is because Adobe tightened the security with this new version even further.  Now, I am aware that security is necessary for a plugin like flash. But there’s one measure I can’t figure out.

Any browse or save as dialog can only be triggered by user input (keyboard or mouse(click)). And this makes sense, you don’t want an ad to popup thousands of ‘browse’ windows. But I cannot see why this same security measure is taken for doing a multipart request. Why sould user interaction be needed to upload, say a bytearray, to the server. This bytearray could easily be generated from a bitmap(data), so no browse for file window is needed.

This error came up in an application which displays a small photo. The user can upload a photo to the server. This server is somehow not capable of resizing images, so the uploaded image is downloaded to the flash again, resized in flash and send as a bytearray to the server again.

This worked perfectly in FP < 10, but now, there has to be some interaction to do the second upload. We worked around this by having a small popup asking the user if the uploaded picture is the correct one. Works also, but it’s just a work-around, not a solution.

I talked about this issue with James Ward of Adobe, and he also didn’t see why this security has been taken. So, I’ve created a feature request in the bug system of adobe, located at https://bugs.adobe.com/jira/browse/FP-978. Please vote if you think this is a ridiculous security measure and should be removed!

Thanks!

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, pt.2

On , Components, Flash, Flex - 5 Comments

I’ve updated my 3d text component a bit, performance should now be a bit better. Furthermore, you can now choose any font you’ve installed on your system (just to prove that they are real fonts). See it in action:

Ow and by the way: right click to see the source and find out how it’s done.

The source seems to be fucked up, here’s the relevant code: http://experiments.flexperiments.nl/3dtext2/srcview/source/experiments/flexperiments/text3d/Text3dFXApp.as.html

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("&lt;b&gt;test&lt;/b&gt;");
}
 
private function advancedDebug():void {
	var o:Object = new Object();
	o.my_string = "&lt;i&gt;string&lt;/i&gt;";
	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:"&lt;i&gt;item 2&lt;/i&gt;", 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…