Flex

Aug 13, 2008

Flashplayer bug: Incorrect wrapping on multiline Unicode text

Posted by Dennis in Flash, Flex 4 comments

I came across this bug while working on a localised Flex application for one of our clients. In the Thai version of the site the text was wrapping incorrectly. It didn’t cut off sentences where there were whitespaces. Instead it cut off in the middle of words. Take a look at this example:

You can see [...]


Aug 12, 2008

Blender exporter for Sandy, Papervision3D and Away3D updated

Posted by Dennis in 3D, ActionScript, Blender, Flash, Flex 2 comments

The export script for Blender has been updated. It is now compatible with the latest versions of Papervision3D (2.0) and Away3D (2.1.0).
It also contains a bugfix that solves an annoying problem with the “choose engine” dropdown menu.
Download the script here.


Aug 4, 2008

How to add the Subversion revision number to an ActionScript class using Ant

Posted by Dennis in AIR, ActionScript, Flex 4 comments

This comes in quite handy when you want to keep track of which version of your swf file resides on the server. You can trace it out and use Flashtracer or other tools like Flash Inspector. In short, this is what you have to do:

Make sure you have the latest Subversion
Create a template ActionScript class [...]


Jul 30, 2008

Showing the hand cursor on a Flex scrollbar

Posted by Dennis in ActionScript, Flex 5 comments

Here’s a little trick/hack to get the hand cursor to appear on the up and down arrows of a standard Flex scrollbar. In order to do this you need to create a class that subclasses a class that has a scrollbar attached to it. In this case a TextArea:

public class CustomTextArea extends TextArea

The class mx.controls.TextArea [...]


Jun 25, 2008

Calling endEffectStarted() after adding new EffectEvent.EFFECT_END event listeners

Posted by Dennis in AIR, Flex No comments

Quick note on a Flex problem: when using Fade effects on background images in conjunction with a ToggleButtonBar it often happened that the event handler for the EffectEvent.EFFECT_END event was never called. This usually happened when the buttons were clicked in a rapid fashion. Adding a call to endEffectsStarted() just after attaching the event listener [...]


Apr 24, 2008

Flex Builder + Ant Build + Debug + Console Output

Posted by Dennis in AIR, ActionScript, Flex 4 comments

Flex Builder, as opposed to Visual Studio, doesn’t have post-build scripts that allow you to easily copy assets to the build folder.
If you need to do this Ant is a good alternative. There can be problems connecting the Ant build process to the debugger though.
The solution to this problem is to add a builder to [...]


Jan 2, 2008

Export your Blender objects straight to Away3D, Papervision3D and Sandy!

Posted by Dennis in 3D, ActionScript, Blender, Flash, Flex 220 comments

This script enables you to export Blender objects to ActionScript 3.0 objects. This way you no longer have to load external (Collada) files. Supported 3D engines are:

Away3D
Papervision3D (version 1.7 & 2.0)
Sandy 3.0 & 3.1
Alternativa3D

Flash & Flash Developer’s Magazine offers a free PDF version of the issue that contains the “Blender to Flash workflow” that was [...]


Nov 13, 2007

Official Sandy3D 3.0 release and new demos

Posted by Dennis in 3D, ActionScript, Flash, Flex 2 comments

It’s out! Finally! Sandy 3.0, the ActionScript 3.0 version of this great 3D engine is here. Read more about the new release on the Sandy blog. Also check out the new demos (the first two on the page are made by yours truly :-).
There’s already a lot of work being done on the next version. [...]


Sep 27, 2007

How to integrate 3D Sandy objects into Flex

Posted by Dennis in 3D, ActionScript, Flash, Flex 30 comments

This small demo shows you how you can integrate Sandy objects into a Flex application. Actually, it’s quite simple. All you need to do is create a UIComponent and use the addChild() method with your Sandy Sprite. This demo takes it a tiny bit further and shows you how you can communicate between a 3D [...]


Sep 25, 2007

Sandy3D: adding interactivity to 3D objects

Posted by Dennis in 3D, ActionScript, Flash, Flex 14 comments

In this small demo you can see how you can add interactivity to Shape3D objects. Every Shape3D object has a property called container which is a native Flash Sprite. This means you can add event listeners and apply filters the same way as you’re used to with Sprites. I added event listeners for the mouse [...]