We released a new 0.7 version of the Spring ActionScript framework yesterday. This release is the first official release since moving from the Prana framework to the Spring ActionScript framework and contains a bunch of fixes and enhancements to the IoC container, an experimental MVCS package and a lot of new utilities. We also removed the Reflection API and now provide that as a separate library called AS3Reflect.

For more info on Spring ActionScript 0.7, please see the official annoucement at http://www.herrodius.com/blog/160

More info on AS3Reflect can be found at http://code.google.com/p/as3reflect/

Hope you enjoy this release. Happy coding!

- Christophe Herreman, Spring ActionScript project lead


No Tags

December 3rd, 2008Spring ActionScript

I’m pleased to announce that Prana has become Spring ActionScript and is now incubated as an extension for the Spring portfolio. Needless to say that this is some pretty exciting news.

Please see http://www.herrodius.com/blog/157 for more info and the offical announcement.

Since we now have a new forum at http://forum.springframework.org/forumdisplay.php?f=60, I would like to ask everyone to register at the new forum and post questions over there.

Enjoy the framework and thanks for your support!

regards,
Christophe


No Tags

1. Introduction :

If you are an AIR fanatic like I am, you might have heard of a project called Merapi. The Merapiproject.net is an open source project to create an easy link between Java applications and AIR. They have just entered their first alpha. The source isn’t available ( yet ),but you can download a .swc file and get started !

In this post I’ll explain how to transfer custom objects from one runtime to the other using Merapi. I’m using Eclipse for both my Java and Flex projects. There a lot of examples on how to set this up so you can have a good working environment.

2. Time to get started :

The application I’ll show you here doesn’t do anything fancy. I’ll just create a custom class called Shizzle in Java, and send it over to Flex and starting using it immediately. Here are some screenshots on how my projects are organized :

Read the rest of this entry »


Technorati Tags: , , , , ,

I’m pleased to announce that the Prana Framework 0.6 release is now available.

Prana

Download | API Documentation | Changelog

In this release the following remarkable changes and additions have been made:

  • the IoC container is now ActionScript 3 compatible
  • command factories for Cairngorm’s FrontController
  • more PureMVC experimenting

For more info, please see the official announcement at http://www.herrodius.com/blog/149.

Have fun coding!


No Tags

So you want to replace your cube’s sides with some fresh BitmapData? At runtime?

As you probably noticed before, there isn’t much of a reference on the Internet explaining on how to change the material of a cube (or any other 3D DisplayObject) in PaperVision3D.

You probably already know that you can assign wonderful materials like ColorMaterial, BitmapMaterial, etc to a cube by using a MaterialsList in its constructor.
But what should we do if we want to change the material after the cube has already been created?

The first thing you’d tried is to reapply the cube’s materials property (cube.materials = myNewMaterialsList) but you’ll notice that won’t work.
After looking for a few days I found the solution on how to reapply a new material (it has some limitation though).

The rescuing phrase:
cube.materials.getMaterialByName("front").bitmap = image;

Where “image” is a BitmapData Object.
Before you test this, keep in mind that there are a few limitations before this actually works (I don’t think its meant to be used like this)

Keep in mind that you are changing the side of the cube to a new bitmap so in the constructor of the cube: define the material of the side you want to change as BitmapData.

The code I used (there are several possibilities to do this):

var defaultFrontMaterial:BitmapMaterial = new BitmapMaterial(new BitmapData(267, 375, false, 0xFFFFFF));
defaultFrontMaterial.smooth = true;
defaultFrontMaterial.doubleSided = false;

var defaultBackMaterial:BitmapMaterial = new BitmapMaterial(new BitmapData(267, 375, false, 0xFFFFFF));
defaultBackMaterial.smooth = true;
defaultBackMaterial.doubleSided = false;

// Materials
materials = new MaterialsList(
{
front: defaultFrontMaterial,
back: defaultBackMaterial,
right: new ColorMaterial(0xFFFFFF, 1),
left: new ColorMaterial(0xFFFFFF, 1),
top: new ColorMaterial(0xFFFFFF, 1),
bottom: new ColorMaterial(0xFFFFFF, 1)
} );

The default material you are about to create for the cube’s front side should have the same dimension of that particular side. If you try to make the new BitmapData with a height and width of 1px and a solid color, you’ll end up with a rescaled image when you try to reapply the new material. (You might think: this default BitmapData side won’t display an image so why wouldn’t I make it 1px by 1px, but that’s a wrong thought :p).

And that’s it! I hope this method works for your particular case. This technique also works perfectly if the side has multiple faces (segments).

Many thanks to my collegues for supporting me and many thanks to PaperVision developers for the great API but let’s all hope they’ll make setters for applying new materials at runtime.


Technorati Tags: , , , , , , , ,


© 2007 labs.boulevart | iKon Wordpress Theme by TextNData | Powered by Wordpress | rakCha web directory