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.