Archive

Archive for January, 2008

Runtime Dynamic fonts Flash CS3

January 28th, 2008

All the examples showing runtime dynamic fonts for flash cs3 includes that you export swf file with a class that contains embedded font [Embed ??my font??].

This doesn’t really works for me because I need specified characters for a lot of different countrys. Usually when developing a flash application I have to handle between 15-50 countrys.

embed01

So I made my own little solution, made one of these for flash 6 for a couple of years ago and the trick still works. It basiclly works by loading shared runtime librarys and then embedded fonts will be shared cross the application when using a lot of swf files.

Making it a static class it’s easy to use.

CSS.loadStyleName = "default";CSS.loadStylePath = "css/";CSS.addEventListener(IOErrorEvent.IO_ERROR, this.onError);CSS.addEventListener(Event.COMPLETE, this.onComplete);CSS.initialize( this );

And then to use it on textfields.

txtField.styleSheet = CSS.styleSheet;txtField.embedFonts = true;txtField.htmlText = "<span class='subTest'>Embed Arial</span>";txtField.rotation = 5;
 
txtField2.styleSheet = CSS.styleSheet;txtField2.embedFonts = true;txtField2.htmlText = "<span class='subTest'>Try embed Arial Black</span>";txtField2.rotation = -5;

To make this work.

1.1) Create your shared library file (example: default_lib.fla)

1.2) Create MovieClip on stage and export it for runtime.

1.3) In the MovieClip create a textfield for each font you need, embedd all the characters needed.
embed02

2.1) Create your shared library holder file (example: default.fla)

2.2) On the stage add the runtime MovieClip and give it instance name mcFont

3.1) Create your css file (example: default.css)

3.2) Add the styles that your need
embed03

4.1) In the Application file add the following load code (look at example in top)

You can download example files here: runtimefonts_as3

Flash , , ,

My b2evolution!

January 26th, 2008

Just had some time over and installed b2evolution.
So now it’s just to keep this baby updated.

Will as well look over the art, having some trouble getting the skins working.

Interested? Look at their site: http://b2evolution.net/

Life ,