Archive

Archive for the ‘ActionScript 3’ Category

font embedding tip – “Error: Unable to transcode…”

January 22nd, 2009 5 comments

hi folks,
this week i had to externalize fonts in an AS3 project. so i looked into my delicious links and found two very good tutorials, one by Troy Gardner on the TroyWorks blog and another one by Deden Ramadhan on the ini na!! blog.
in the first moment everything worked fine and i had no problems embedding the fonts, loading them and finally using them at runtime. i like how it works!
some days later i had to embed cyrillic, chinese and japanese characters from an ArialUnicodeMS.ttf font. then i always got the error message: “Error: Unable to transcode ArialUnicodeMS.ttf.”, at compile time. the first idea was that there’s something wrong with the ArialUnicodeMS.ttf file, because it works fine with other font files. so i tried another ArialUnicodeMS.ttf file from a colleague, but the result was the same error message. using google wasn’t that much successful, but i got a hint from a colleague that
flex includes several font managers to handle embedded fonts, exactly three. here you can find some informations about the three managers in the livedocs.

so the solution for my problem was to use the flash.fonts.AFEFontManager and everything works fine. to change the font manager you can simply use the compiler argument:

-managers flash.fonts.AFEFontManager

for your mxmlc compiler.

news review -> 42th week of 2008

October 17th, 2008 1 comment

pause Timer with ExtendedTimer in ActionScript 3.0

October 16th, 2008 34 comments

hey guys, last week i needed to pause several timers and resume them later on. i ran into a problem which i try to explain in an little example.

so let’s say you start a Timer with 1000 milliseconds delay and stop it after 600 milliseconds. if you call Timer.start() again, it starts with a new delay of 1000 milliseconds again. there is no built-in possibility to resume the timer for the remaining 400 milliseconds. i thought “nothing easier than that, just call Timer.pause()”. but there was no such method, so i decided to write my own ExtendedTimer class and add the pause functionality. now i like to share it with you…

> ExtendedTimer.as
package com.fjakobs.utils
{
	import flash.events.TimerEvent;
	import flash.utils.Timer;

	/**
	 * @author fjakobs
	 */
	public class ExtendedTimer extends Timer
	{
		private var _startTime : Number;
		private var _initialDelay : Number;
		private var _paused : Boolean = false;

		public function ExtendedTimer(delay : Number,
									  repeatCount : int = 0)
		{
			super(delay, repeatCount);
			_initialDelay = delay;
			addEventListener(TimerEvent.TIMER,
						    onTimer,false,0,true);
		}

		private function onTimer(event : TimerEvent) : void
		{
			_startTime = new Date().time;
			delay = _initialDelay;
		}

		override public function start() : void
		{
			if(currentCount < repeatCount)
			{
				_paused = false;
				_startTime = new Date().time;
				super.start();
			}
		}

		public function pause() : void
		{
			if(running)
			{
				_paused = true;
				stop();
				delay = delay - (new Date().time - _startTime);
			}
		}

		public function get paused() : Boolean
		{
			return _paused;
		}

		public function get initialDelay() : Number
		{
			return _initialDelay;
		}
	}
}

news review -> 41th week of 2008

October 12th, 2008 No comments

news review -> 40th week of 2008

October 4th, 2008 No comments

news review -> 39th week of 2008

September 26th, 2008 No comments

news review -> 38th week of 2008

September 19th, 2008 No comments

here are some articles i was interested in this week…

Flash Magazine > SlideRocket goes into Public Beta phase


Pixel Bender Grayscale Filter at Mike Chambers


Creating Re-distributable ActionScript Libraries of Pixel Bender Filters at Mike Chambers


Tutorials | Adobe Flash & AS3 Tutorials Roundup « Flash Enabled Blog


Pixel Bender levels example – Antti Kupila


Scribblar : Real time multi-user whiteboard!


Flash Magazine > Flash Community chat


The Official Flex Team Blog: Adobe and Zend Announce Collaboration


Why I love the Flash Community at Mike Chambers


Nuon doet « Papervision3d Daily


Sleepy Design: Flash Player 10 : drawTriangles is faster?


Adobe Labs: Flash Player 10 Release Candidate Update Available on Labs


Doug McCune » Followup for Using BitmapData for Array manipulation: using a hashmap is (a little) faster


Doug McCune » Using BitmapData for Array manipulation in AS3


Adobe Announced New Flash Media Encoding Server | Adobe Flash Lite


Ted On Flex: 360Flex SJ 2008 – Using the Flex Builder 3 Profiler by Jun Heider


Flash Magazine > Flash Video for Professionals


Flash vCam still Alive | Ajar Productions


Adobe – Developer Center : Introducing Flash Player 10 beta


dispatchEvent() » Discussion: How best to benchmark Flash?


nesiumdotcom — Trazzle


Flash Player Text Engine Examples For Flex 4 (Gumbo) | Flex & AIR


Flash: Multiple Runtime Font Sharing Embedding with only Partial Character sets: How To. : TroyWorks


dispatchEvent() » Understanding Comics Chrome


Adrian Parr’s Blog » Flash Video to have Speech-to-Text Metadata

flexughh-meeting (25.08.08): Marco Kaiser – “twhirl”

July 29th, 2008 No comments

hey guys,
the next flexughh-meeting was announced yesterday. it’ll take place on august 25th, 7:30pm in the holy halls of elephantseven. the great company i’m working for and which helps to realize this meeting.

Marco Kaiser will tell us something about twhirl. twhirl is a social software desktop client, based on the Adobe AIR platform.

for more infomation and registration please visit the <flexughh:Blog/>

Categories: ActionScript 3, AIR, flash, flex, general

“FCSH-Wrapper” renamed to “BigSource Zarkov”

July 18th, 2008 1 comment

the great tool “FCSH-Wrapper” is from now on called “BigSource Zarkov”. the developers decided to rename it, because they are planning to add support of other compilers than mxmlc and the flash compiler shell (FCSH). they allready added support for the AS2 compiler mtasc. for more detailed information visit the developers blog on http://blog.bigsource.de

eclipse update url http://update.bigsource.de/update

use FCSH via ant

May 30th, 2008 4 comments

yesterday two very good buddies from BigSource released their FCSH Wrapper plugin for eclipse. i was one of the first beta testers and i have to say that it’s a great tool for my daily work. the Flex Compiler Shell (short FCSH) is much more faster than the MXMLC compiler, because only the changes in your code and not the whole project is compiled by FCSH.

so get it from http://blog.bigsource.de, use it to compile your flash projects and have more fun at work!!!