Now available: FlpTree 1.2.1

On December 1, 2008, Components, Flex - 7 Comments

Finally!!!! I nailed the height bug! So, now you can finally make advantage of the variable row height! After a lot of searching, setting debug statements and all other debugging stuff, it turned out one event was called a bit too much which caused flex to seriously fuck up. Still can’t find the exact reason for it, but removing the listener did not harm the tree at all, so it was useless anyway :-) .

You can download the new swc from the project page, which is here. Also, a link to the docs and an example can be found on the project page

Have fun!

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

Storing classes in a PHP Session with AMFPHP

On October 6, 2008, PHP / HTML - 1 Comment

I’m working on a small project with a AMF / PHP backend. The project has different roles and users, and I’m storing the user object in the session of PHP.

Now, according to the PHP manual, it should be possible to store complex objects (and classes) in the session. So when I put the user in the session and then dumped the session to the browser, I was pleased to see everything was in it. So far so good…

But then, strange things started to happen. Whilst the data was in the session, I wasn’t able to get it out easily. To understand what I mean, look at the following examples:

The user has a property ‘projects’, which is an array of projectObjects, which look like this:

class ProjectObject {
	var $_explicitType = "ProjectObject";
 
	public $name;
	public $id;
	public $lastModified;
}

Pretty straightforward.
Now, when i output the projects array using print_r, I get this:

Array
(
    [0] => __PHP_Incomplete_Class Object
        (
            [__PHP_Incomplete_Class_Name] => ProjectObject
            [name] => Test1
            [id] => 1
            [lastModified] => 1218479521000
        )
    [1] => __PHP_Incomplete_Class Object
        (
            [__PHP_Incomplete_Class_Name] => ProjectObject
            [name] => Test
            [id] => 2
            [lastModified] => 1218479559000
        )
)

Which is ok (I think).
But when I want to access any of the properties of the project, it will return an error, null or an empty string:

echo $user -> projects[0] -> id; // returns "";
echo $user -> projects[0][id]; //Fatal error: Cannot use object of type _PHP_Incomplete_Class as array
echo $user -> projects[0]["id"];//Fatal error: Cannot use object of type _PHP_Incomplete_Class as array

Weird huh? more…

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.

Always close your lines with a semi colon!

On September 23, 2008, Flex - No Comments

Today I encountered some strange behaviour when using the [ArrayElementType] tag. I had a piece of code which looked like this:

?View Code ACTIONSCRIPT
package {
	import mx.collections.ArrayCollection;
	[Bindable]
	public class MetaData {
		public var ac:ArrayCollection
		[ArrayElementType("nl.flexperiments.test.TestObject")]
		public var ac2:ArrayCollection;
	}
}

more…

Now available: FlpTree 1.2.0

On September 16, 2008, Components, Flex - 2 Comments

Formerly known as the IKTree, FlpTree has an updated version. This new version has several bug fixes and the overall performance is improved. Changes since the last version include:

  • FindNode(s) works now properly;
  • Selection and multiselect now works
  • Performance tweaks
  • Other bugs which I forgot about
  • Added open on hover more…