|
-
[RESOLVED] Embedding font --> invalid data?
I have no idea what is going on here. Any one else having similar issues?
Code:
Embed(source="/Library/fonts/SwissBTExtCom.ttf", fontName="Swiss 911", mimeType="application/x-font-truetype")]
This throws:
Error: Error #2136: The SWF file contains invalid data.
I can't find anything about this anywhere... Thanks for the help.
While the music played you worked by candlelight
Those san francisco nights
You were the best in town
Just by chance you crossed the diamond with the pearl
You turned it on the world
That’s when you turned the world around
-
Senior Member
Just for clarification, do you have the line between <mx:Script> tags?
Have you tried this: source="SwissBTExtCom.ttf"?
- The right of the People to create Flash movies shall not be infringed. -
-
Thanks for the response CancerInform, This is actually just outside a class in a class/Package file. The class is being called from inside the mx:script tags.
I did put the font in the local directory and no luck there either. (FYI: it needs to be source="/SwissBTExtCom.ttf", for some reason). I am really stuck here. Any other suggestions?
While the music played you worked by candlelight
Those san francisco nights
You were the best in town
Just by chance you crossed the diamond with the pearl
You turned it on the world
That’s when you turned the world around
-
Senior Member
You can try this and create a style script:
PHP Code:
<mx:Style>
@font-face
{
src:url("/Users/username/Library/Fonts/myfont.ttf");
fontFamily:myFont;
}
</mx:Style>
- The right of the People to create Flash movies shall not be infringed. -
-
Thanks for the help CancerInform. That method did work but I needed to use TextFormat instead of HTML or css text.
I finally figured out what was going on. For each font you need to create a private class under to load. So for my example above:
Code:
[Embed(source="/SwissBTExtCom.ttf", fontFamily="Swiss911", mimeType="application/x-font-truetype")]
private var Swiss911:Class;
This was an error with ActionScript 3.0 Cookbook. That is annoying. Spend $50 and still need to find the answers on the Web.
Hope no one else wastes their time on this. Don't forget t(:TextField).embedFonts = true;
While the music played you worked by candlelight
Those san francisco nights
You were the best in town
Just by chance you crossed the diamond with the pearl
You turned it on the world
That’s when you turned the world around
-
Senior Member
I knew that but I thought you had done that, because the rest of your script was correct.
- The right of the People to create Flash movies shall not be infringed. -
-
You would have thought. But hey thanks for the help. Problem solved now.
While the music played you worked by candlelight
Those san francisco nights
You were the best in town
Just by chance you crossed the diamond with the pearl
You turned it on the world
That’s when you turned the world around
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|