Posted by Bart Claessens
on January 07, 2010
ActionScript 3,
Flash,
Flex,
QuickTips /
1 Comment
As we all know, Flash has these crazy bugs nobody ever understands. One of those is the fact that the last character of a dynamic textfield (which has been set to “AutoSize”) gets cut off when you’re using an embedded font. Up till now I still don’t understand what kind of situation leads to this exceptional behavior. The only thing I can say is that Flash Player fails to determine the correct text length which screws up the textfield width to be shorter than it has to be.
Example:

Blurred/Cut Off Characters
Continue reading…
Tags: failing width calculation, font embedding, quicktip, textfield autosize
Posted by Bart Claessens
on June 15, 2009
ActionScript 3,
Flash,
Flex,
QuickTips /
No Comments
The past few weeks I’ve been programming a scheduling component in Flash which has to be extremely performant. Every small adaption in my code that could help with limiting the processing needs is a good adaption. Today I stumbled upon a post of Grant Skinner in which he explains that using a uint is slower than a normal int. The uint’s can get five times slower than using a normal int.
Continue reading…
Tags: ActionScript, actionscript performance, int, Number, performance gains, uint
Posted by Bart Claessens
on February 15, 2009
ActionScript 3,
Flash,
Flex,
QuickTips /
3 Comments
Some of you will probably know the ‘as’-keyword. If not, a short explanation:
The ‘as’-keyword is used to cast an object to another one. (Well it’s not exactly ‘casting’, if someone feels like explaining the difference between casting with the ‘as’-keyword or by using the class constructor, please go ahead in the comment below!).
To make it more concrete, here is an example: Continue reading…
Tags: 'as'-keyword, as3, casting
Posted by Bart Claessens
on November 25, 2008
QuickTips /
3 Comments
Today I stumbled upon the following problem while parsing an xml: I tried to parse an attribute of an XML node which contained ‘\n’-characters and tried to put this parsed text into a dynamic text field on the stage.
Guess what, instead of parsing ‘\n’ to a newline, AS3 showed me the ‘\n’ in my text. This is not as I had hoped.
You can fix this very easily by Continue reading…
Tags: carriage return, newline, parsing, tab, w3schools, xml
Posted by Bart Claessens
on November 25, 2008
QuickTips /
No Comments
If you feel like your built-in iSight Macbook Cam is not working correctly when you are visiting a Flash website or viewing a Flash application, you are pretty much wrong my friend.
Ok, I have to admit, it’s a kind of hidden but you’ll have to change a small option to get it working.
Here’s a little walkthrough:
Continue reading…
Tags: macbook, not working, settings, webcam
Posted by Bart Claessens
on November 21, 2008
QuickTips /
No Comments
Did you know that casting a String to a Number using the ‘as’ operator returns 0 instead of the correct number? Use the Number() constructor to cast it correctly. The same applies for ‘int’ and ‘uint’.
Continue reading…
Tags: casting, int, not correct, Number, uint, zero