AS3 ArgumentError: Error #1508

Posted in Flash at 8:25 pm by Curtis J. Morley

ActionScript3 Error 1508: The value specified for argument font is invalid

This ActionScript 3 error is caused by several different things. It can be a font embedding issue. It can be an issue with loading a font swf to the same location on a server. It can be several things. One of those reasons is easy to solve. This ActionScript error will show up when you have an incompatible font in  Flash or Flex. TLF text is great and most of the time you won't run into error 1508. I have only ranAS3 Error 1508 once, thus this post.

One simple fix is to specify a font that is compatible with TLF Text. In my case I was using TradeGothic LH Extended and BoldExtended. Flash didn't like these fonts and threw out ActionScript Error 1508. If I scrolled up I also noticed that it gave me a very nice description of the error. It said, "The font named TradeGothic LH Extended is not compatible with TLF text. TLF text using this font will not display properly. Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts." So as you can see I just needed to change the font to a compatible font and everything worked out fine.

AS3 Error 1508 is a complex AS3 error message, but in this case a very easy fix.

As always Happy Flashing

Curtis J Morley

Leave a Comment