Blog

I don’t think we are ever going to see a solution for embedding fonts in ActionScript that is easy to use. In AS3 we were introduced to the use of the [Embed] tag, allowing you to embed files both from the local system, and also from exported swf files. Extra options include the option to specify the unicode character ranges, to save on file size. The best solution, is to use runtime shared libraries or make use of getDefinitionByName() to extract them out of loaded swf, however what happens if you need a textual preloader to load the font swf, and you get the fatal “Unable to transcode Font” message when using the embed tag in the flex compiler?
Well, firstly this happens because there are three font transcoders in the Flex compiler, and they all prefer TrueType fonts, and all suck (in my humble opinion). So the solution is to use the old faithful Flash IDE to handle your PostScript related font issues.
To do this, create a TextField instance inside a symbol and give it an instance name like “textField”, make sure you select the “embded fonts” option and only include the number of characters you require. Next mark the symbol for export and remember the class name (you don’t need to create a corresponding .as file for this class, one will be generated for you, also it doesn’t matter if you have the “declare stage instances” option on or off, this will be handled by for you as well).
The next step is then to use the embed tag to import this symbol (quick tip use the # symbol after the .swf to access the class name quickly e.g. [Embed (source="embeddedFields.swf#FontField")] ) and then all you need to do is instantiate the class and use inline array notation to access the TextField instance and use it like a regular textfield, like (fontFieldInstance['textField'] as TextField).text = “ta da”;
Peezy

Hey,

Having just completed a project using vector vision, i cant wait to use it again! We have had a lot of positive feedback for the way it looks. I would recommend to anyone wanting to use fonts in 3D that this is the way forward.

I still cant get over the way mathieu-badimon over at five3d creates fonts to be rendered by the engine. You have to download a flash panel from his site which you pass in the font you want a 3d version of, and it creates a class with all the typographical meta data about each glyph needed to allow flash to draw with the standard ‘lineTo’ function each letter with the correct letter spacing: check out this class: HouschkaLight.as tis pretty amazing stuff!

Check out the photography agency site that we just did that I used this in trayler.co.uk

Hey,

I thought I’d share a Ulrika moment with you all regarding FDT 3 and Debugging…

For the past few days, every spare hour I’ve had I’ve been trying to get debugging working in Eclipse using FDT 3.0 enterprise - for some reason it just wouldn’t stop at the break points, and then…. urika! so i thought I’d tell you the thing they forget to tell you……

Since the demise of Xray browser in AS3, which allowed you to drill down into objects to find their children and variables, working out the state of the application at any given time has become a nuisance, time consuming, and down right frustrating. This even forced Alex - another of our developers out of Eclipse and into Flex Builder to author flash projects - just to get the debugger feature. This was even to the sacrifice of some the amazing features of FDT such as quick assist and even eclipses templates feature.

For all others that cant seem to get the debugger to stop at the breakpoints, it seems that eclipse dosn’t like the spaces that are in the path name to the default linked library ‘playerglobal.swc’ - so a simple sym link or just by moving this swc to a place with a clean source path and wolla - DEBUGGING IS BACK! oh - dont forget to update the linked library for the current project, or you’ll be back at square one.

hope this helps a lost debugger somewhere

Russ

Here at Emak Mafu we’ve been working on project that for one reason or another has to be coded in AS 2.0, which is a real pain seen as I’ve recently made the jump to AS 3. In this past week my screen has seen more yelling than ever, and I thought I’d let you know why.

Debugging

Where on earth are the compile time errors in AS 2? Seriously, if your working with complex/dynamic objects, or using any sort of design patterns then you might as well go home. I would estimate that about 40% of my coding time has been spent sifting through my code looking for things that AS 3 simply would not let you code, which brings us to…

Loosely Typed Objects

So it seems that without the mx library, AS 2 has about 4 classes (ok, maybe slightly more) which makes it really hard to predict the inputs and output of various core components. Worse still it seems that every plug-in and framework under to sun has been built with no extension in mind, at least with AS 3 you’d usually start off by extending the…

EventDispatcher

Thank god for the mx EventDispatcher, I think I would have gone crazy if I had to keep passing references in and out of singletons, where’s the cohesion in that? Its not the best though, and the number of times I’ve tried to dispatch an event from a MovieClip (errh, no Sprites?) or Object without first initializing it with an EventDispatcher, why its like trying to invoke Quicksilver on someone else’s mac, only to find there not using it (its doubly embarrassing if their using a PC). And speaking of Sprites….

CreateEmptyMovieClip()

I hate this, I really, really hate this. Lets say I want to create a MovieClip, and store a reference to that MovieClip. Here we go…
var mc:MovieClip = _scope.createEmptyMovieClip("mc", _scope.getNextHighestDepth());
Do any of you clever communication experts see the redundancy? I have a variable called mc, but I also specify a string name “mc” as well. Why? I don’t know, well I guess I do, its because the stage and variable components of the MovieClip model are not loosely coupled i.e. to create a MovieClip, you have to place it on the stage there is none of this lovely var mySprite:Sprite = new Sprite(); business that we have in AS 3. The most frustrating thing about this is, is that if you are naming clips in a loop, you may inadvertently confuse your variables, which is again all about the debugging. I suppose if you had to sum it up, you could say that its a…

Better Language

Because AS 3 is more like Java, you tend to think in a more OOP way, which in turn makes you think about things a bit differently. Instead of rushing in and hacking together a solution, you tend to think about how you are going to extend and re-use your code. Of course, this is not to say people didn’t do this in AS 2, it just feels more natural in AS 3 and it shows. You can tell when your coding in AS 2 that they haven’t gone the whole-hog. Some features in particular feel like they’ve been tacked on (the MovieClip.beginFill() as opposed to Sprite.graphics.beginFill() for example), creating some kind of mad-max-esque contraption.

I hope that this persuades some of you who are reading this to make the move to AS 3, best thing I ever did (coding wise, I’m not that sad).

Flash Player 10 - Astro

October 25th, 2007

Someone kindly videoed a portion of the Abobe MAX conference in Chicago - where they were exhibiting a sneak peak of what is in the next generation player to come out. Some really cool features seem to be in there, and ones that makes sense to be too. They seem to be working on their own answer to PaperVision by adding a z axis, although - no where a near where PaperVsion is now - but definitely delivering for the high demand of 3D environments.

Another cool feature that they have created is the ability to float text over many text box’s, just as if you were in InDesign, a solution that will bring a new layout to flash text through out the world.

They talk about some other stuff too - check out the video:

Airtight

October 9th, 2007

Airtight (aka Felix Turner) has been doing some great stuff recently check out his site here. My favorite is this which I think could have some great uses online.

Tilt Viewer