Powered by With Itt

Tracing out embedded fonts

One thing I’ve noticed (especially in cs4) is a hard time identifying the names of the fonts you’re embedding. For instance: the font I was using “Helvetica Neue BlackItalic” (as in the IDE) when traced turned out to be “12 pt. Helvetica* 96 Black Italic 16472″. Seriously, flash? Wow. Totally sucks. I would have never figured it out unless I did this (directly from the flash docs):
[code lang=”actionscript”]
var fontArray:Array = Font.enumerateFonts(false);
for(var i:int = 0;

Posted at 10pm on 06/18/09 | no comments | filed under: AS3 READ ON

Try/Catch Example

So I’ve been thinking of a non-hacky way to use try/catch - and I finally found one (I think).

 
try
{
var classRef:Class      = getDefinitionByName($name) as Class;
}
catch(e:*)
{
trace(e)
}

Generally, getDefinitionByName just fails if a variable isn’t defined and you get this lame runtime error:

ReferenceError: Error #1065: Variable  is not defined.

 

I’m not a huge fan of that. I wanted to use getDefinitionByName

Posted at 11pm on 06/16/09 | no comments | filed under: AS3 READ ON

I heart actionscript.

I heart actionscript is a site devoted to the education and sharing of all things actionscript.  These tutorials and articles are based on my experiences and problems I have encountered in my struggle to make the leap from designer to stellar coder.  I hope iHeartActionscript finds you well.

del.icio.us Slashdot Digg Facebook Technorati Google Yahoo

I heart categories.