I have been struggling with several migration issues when going from flexSDK 3.2 to 4.1. This is another strange one. Continue reading
Tag Archives: actionscript
Embedded fonts disappear when updating to FlexSDK 4.1
I recently updated my flex SDK to 4.1, (from 3.x) just to find that all my embedded fonts were missing.
This was the scenario:
- * Embedding fonts using the [Embed] meta tag
- * Applying font using TextFormat (don’t know what happens if you use CSS, my guess is that it won’t work either)
Quick fix: note the “embedAsCFF”
[Embed(source="font.ttf", fontFamily="x", mimeType="application/x-font", embedAsCFF="false")]
public var FontClass:Class;
What is this?
I used the Font.enumerateFonts() to get an array of my embedded fonts (my font was there, but still not visible in my textfield).
Check the fontType-property. Here I found that it was “embeddedCFF” instead of “embedded”. What is the difference?
“embeddedCFF” is a bit more lightweight, but can only be used with the new text engine (flash.text.engine.*).
“embedded” is an embedded font, but can only be used with the older flash.text.TextField.
Since the SDK 4.1 it seems like fonts are embedded as CFF by default, which breaks all the fonts in TextFields if you have coded with an earlier SDK before.
Docs about this: Livedocs about FontType.
Hope this helps. Good luck.
Relaxy ActionScript IDE
I have a habit of trying out new actionscript editors every once in a while, and right now nothing beats the free, open source FlashDevelop IDE, althogh their buggy debugger is a really huge drawback (I really hope they manage to get it right really soon!).
Anyway, there is another IDE coming up that seems really interesting – called Relaxy ActionScript Editor. It is currently in closed beta, but I will check it out as soon as the beta goes public. Until now I have only seen a few video demos, but it sure looks promising.
Read more about it here: http://makc3d.wordpress.com/2010/04/09/get-realaxy-actionscript-editor-beta/, or look at the video directly below.
AS Editor : Smart complete from den ivanov on Vimeo.
Ghost4Koin – a game in less than 4 kb
![]()
In 2009 I gathered a team of co-workers from Isotop to enter a competition where you were supposed to build a game with a final result of less than 4 kilobytes.
Since I’m both interested in game development, optimization and low level actionscript this competition seemed even more compelling to me.
The game is released over at Wonderfl (http://wonderfl.net/c/7uqT), although it’s so optimized that it’s more or less impossible to understand anything =)