Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Embeding Fonts And Masks?



Hey all, ive hacked at my code for a fix 4 the last 6 hours. Now seeking outsite help.

Im making a scrolling "news" window in flash, im importing the data from xml and creating text fields (with AS) on the fly to put the information in.

My problem is i want the MC with the textfields to sit behind a mask for scrolling purposes. But i cant see any of my text because none of my characheters are embeded. How can i make it embed my fonts using actionscript??? Please help!

My Code
-------------------------------



ActionScript Code:
menuXml = new XML();menuXml.ignoreWhite = true;menuXml.onLoad = function(success) {  if (success) {  menuItem = this.firstChild.childNodes;      for (var i=0; i<menuItem.length; i++) {  _root.news.loadNews.theNews.createTextField("text1", 10, 45, 20, 100, 50);_root.news.loadNews.theNews.text1.embedFonts = true;_root.news.loadNews.theNews.text1.multiline = true;        _root.news.loadNews.theNews.text1.wordWrap = true;        _root.news.loadNews.theNews.text1.autoSize = true;       _root.news.loadNews.theNews.text1.text = menuItem[i].attributes.date;  } }}menuXml.load("myNews.xml");



Ultrashock Forums > Flash > ActionScript
Posted on: 2004-02-19


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Embeding Fonts
I'm sorry to post this again, I just didn't get a reply which I find weird from flashkit

How do I embed a font for every dynamic text box in a movie. I know I can do it for all text box indidvidualy but I notice that in the pet market application they only embed once for all boxes, How is that done?

Thanks a lot

Dan

Embeding Fonts How?
Hi can I ask you guys a question?
I'm using FfffStar fonts, now these fonts are in a folder in my font file on my computer just like everyone else just to clear that up, how do I embed THESE font in the character option window? is it a copy and past i don't get it.

Embeding Fonts
How do i embed a font that i have, so that other computers that do not have the font will be able to view it?

Embeding Fonts
I have been working with flash for a while and I have never figured out how to embed fonts into my flash sites. is this done with actionscripting?

Embeding Fonts
any body know where to find a good tutorial that shows how to embed fonts into flash 8. i have tried two different tutorials up to now and neither of them have worked.

Embeding Fonts
hi guys

do I need to embed my fonts in the flash file in order for others who don't have those fonts installed on their computers to be able to see the swf file correctly?

thanx in advance

Help Embeding Fonts
hello,
I've a problem with embeding, i'm trying to make japanese-english flashcards using XML, and I'm displaying the text in a dynamic texfield inside an empty movieclip, and this is what I get:
if I display english text from the XML it works ok, with and whitout embed,
if I display japanese text from the XML without embed it works ok, but I need it Embeded for _alpha;
if I display japanese text from the XML embeded all, it dessapear!!
I tried with and whitout System.useCodepage = true; and with and without render html,

please help!!

Embeding Fonts?
I've been reading about embeding fonts and I'm curious to know what the best practice is for when one should embed fonts in their swf files. If you have a lot of static text should you embed the fonts in the swf file that you use or is there a better way to get the fonts to work in your swf? What about dynamic text? Or input text?

thanks.

Embeding Fonts
Is there a way to embed a font for an entire swf instead of embedding every single text area? Thanks for the hepl

Embeding Fonts
Ok I've tried this various ways. I'm trying to embed a few german characters. I've already tried the obvious way of just clicking the embed button and placing them into the "Include Characters..." box, didn't work. Does anyone have any good ideas on how to do this. I'm importing text from an xml file which is in german.

Embeding Fonts In AS
Maybe I'm doing it the old AS2 way.

I go to the library and choose New Font.

select Arial, check bold, size 12.

set the linkage up as "Arial12"

in as I have the embedfonts as true, and textformat I have format.font = "Arial12";

This should work? Nothing shows up.
I can work around this by placing a mc with a textfield that has embeddedfonts, in the library.

But i want to do it properly. Thanks

Embeding Fonts
Hey all,

I'm using as3 to make a web application from start to finish. The problem I've run into is that I can't get Trebuchet MS to embed. It's weird because I embedded another TT font and it works fine. The windows version is an open type font. Any ideas?

I'm not using flex so the [embed] thing doesn't work.

Help With Embeding Fonts
i have i file that i embed fonts but the text dont seems to be good its so blurry right can you guys show me the proper way of doing it here i attach the file and please give me some example or edit the file i attach for an example please

Embeding Fonts
I use static text to embed the fonts, however this works on my browser but on IE the font overlap in places

http://www.powderandpaint.co.uk

is there anyway I can overcome this problem?

Embeding Fonts Files
I know how if I am using dynamic text to hit, embed this font ect. I am looking for a way to embed like 5 fonts into the Flash movie. Is their a way to say: "Ok, I want to embed, these five fonts and have them export as a MC"

Embeding Fonts In Flash
can someone please tell how to embed fonts into flash with out the text being antialiesed.
If I have a dynamic text field but I want to have an embeded font, everytime I embed the font the dynamic text field becomes antialiased which is what I don't want. I want the dynamic text to stay pixelated. Is there a way arround that, thanks for your help.

Embeding & Aliasing Of Fonts
Hi Folks, I know this thing has been discussed in the past a few times. But after searching on other threads ang google I found no final conclusion . The big question is...

Is it possible to have embeded fonts without the F****** anti-aliasing that we all love?

I dont understand why a font in a dynamic text field appears aliased and when you embed it becomes anti-aliased... where is the sense of it?

Any help is appreciated.

Thanks

Embeding Fonts Using CreatTextField
I'm using creatTextfield to create text realtime... but I need to have it displayed under a mask... so right now the text wont show... I understand that you need to have the font embeded so it can show through a mask... how to I embed the fonts using creatTextfield??

This is what I have:

// SongName Text Format ///////////////////////////////////////////////////
mySongNameFormat = new TextFormat();
mySongNameFormat.color = 0xffffff;
mySongNameFormat.font = "Century Gothic"
mySongNameFormat.size = 11;
mySongNameFormat.bold = true;
mySongNameFormat.italic = false;

// I just added this line, doesn't seem to work
mySongNameFormat.embedFonts = true;

createTextField("my_songname"+i, ndepth, 0, nYPosition, nXPosition, 0);

This works fine, but now I have it under a mask layer.. so you can't see it... can you embed the font realtime??

Fania

Embeding Fonts Into Components.
I'd like to customize my form with some pixel fonts. I can change the global font style of the component in question like this,
code:
_global.styles.Label.setStyle("fontFamily", 'FFF Corporate');


but will only work on my machine since I have the font loaded.

How can I integrate a font symbol into my components to insure they display for any user?

Embeding Fonts Dynamically
i am trying to understand dynamic font embedding to scripted textfields. I have a font in the library...to truly test that i am doing this correctly, i used Webdings so i could see the effect. I gave it a class name of Dings

The only way i could get Flash to utilize the font was like so:

Code:
var fnt:Font= new Dings()

var tf:TextFormat= new TextFormat()
tf.font=fnt.fontName
tf.size=25;

var tb:TextField= new TextField()
tb.defaultTextFormat=tf
tb.text="test"
addChild(tb)
but why? Would it not make more sense that it should be:

Code:
var fnt:Font= new Dings()

var tf:TextFormat= new TextFormat()
tf.font=fnt.fontName;
tf.size=25;

var tb:TextField= new TextField();
tb.embedFonts=true;
tb.defaultTextFormat=tf
tb.text="test"
addChild(tb)
note the difference: in the second coding i have set the TextField's embedFont property to true....either way, it loads the font correctly....so, do i need to embed the font? does the first code work because it is simply the font on my machine? or are both codes showing a library font, or are they from different sources?

Embeding Fonts (no-antialias Hlp)
Hello everyone, l've got a couple questions.
I'm trying to embed a font into my movie but l don't want the text to be anti-aliased, as it's a pixel-font and it gets rather blurry.

So if l create a movie clip off stage, with the same font l'm trying to embed, and go ahead and embed that font with all the characters that l'll need, will that do the trick? or does each text area that you're using an uncommon font in have to be embedded?

Any help would come greatly appreciated!
Thanks

Embeding Fonts In Flash
Hi
Can anyone tell me how to embed fonts in a flash file please

many thanks

Embeding Fonts Fromt A .txt
I'm loading a scrollable text box from a external .txt file, and I was wondering if theres a way to embed a font so the imported .txt showes up in a certain font.

Right now, the font inside the text box that's loading the .txt file comes up in a random font (times) on computers that dont have the font I want to use (kroger_0656). Is there a way?

Also, a quick question. how do you turn antialias OFF for embeded fonts?

Fonts/ Embeding /antialias
ok can someone explain all this font sutff to me???

if i create a text field and embed fonts it looks one way, if i dont another (fine i kinda get that, i dont know why it happens but i can excapt it..)

if i use htmlText, it looks different again???

then i keep hearing about fonts for flash, and on http://www.wellvetted.com/ it links to another one of these font places that work well in flash...

well..

i've downloaded all free fonts from both of them, if i srink them really small, like the size of www.wellvetted.com i cant read the things, and if i put them in components they look even wierder....

please some one explain it to me, like im a child....

Embeding Fonts With Actionscript?
hey i was wondering how you would embed fonts with actionscript

i did lee's html css flash tutorial (i dont think its online at the moment i have a downloaded copy) and it works great, the problem is that if the user doent have the font i used then it would look totally different

I know i am right about this because i uninstalled the font i was using after publishing the swf and opened the swf (some totally different font is used instead)

Here is my css file
Code:

.titleText {
   font-family:"Nimbus Script"
   font-size:36px;
   color:#E36A2E;
}

Here is the actionscript i am using
Code:

function createPage(num) {
   var t = clip.createTextField("title", 100, 20, 20, 1000, 700);
   
   t.html = true;
   t.selectable = false;
   t.embedFonts = true;
   t.styleSheet = styles;
   t.antiAliasType = "advanced";
   t.text = "<span class='titleText'>" + p.title + "</span>";
}

I tried using t.embedFonts = true; but that does not work and shows nothing (i think this just tells it to use embed fonts but does not actually embed them)

Anyway help would be appriciated

Embeding Fonts Dynamicaly ( Flash Mx)
I try to build a "business card" builder online. For this application I whould like to offer the posibility to choice few fonts. The questions is - is a way to load dinamicaly a single font (wen you need it) or I need to embed all fonts in a library....

I hope you can understand me.... For example if someone want Arial font the my main movie load a second movie with Arial font embeded, if want Courier then load a second movie with Courier font embeded...

Thanks,
Paul

Embeding Language Fonts For Website
can anyone tell me how to embed language fonts for web site

thanks & regards

Embeding Language Fonts For Website
hi!

i wish to say thanks to all you of you so that i cam to know that there are three ways of embeding font.

but sorry to say that none of these works,

method 1: apply script to dy text field

script:

mytext.text = "The teacher told me about effective techniques.";
mytext.font = "Civic";
mytext.embedFonts = true;


method 2;

I create a dy text field, select the matter and click on character, mark on all the boxes,


method 3:

I create a dy text field, import a new font to library, right click and select linkage, export for runtime sharing and give the site address like http://www.domain.com/images/index.swf


well all these three methods are working for a limit, the text is showing in the desired font when I run the swf file but when i load this file on the site it does not show anything.


i will be highly thankful to all of you, if anyone can resolve the problem.



thanks & regards

Embeding Fonts And File Size
Hi guys,
I've posted about this subject before and was hoping someone might have some more in depth info about it.

When a font is embeded into a dynamic textBox is it embeded in the whole swf, or LITERALY only in THAT textbox?

so far I've had to embed it individually in each txtbox I use, and i don't understand if this is increasing the file size with each new one, or not.

also because i'm thinking of using attachMovie to load in textboxes with embeded fonts, i'm curious if each one will take a while to load in.

did all this make sense? hope so

any help would be greatly appreciated. thanx in advance.

Embeding Fonts Need Fast Aproach
Hi all,

I have attached a zip file containing three fla files and three swf files.

What I want to accomplish is to be able to make the font load just once and only the font I need.

I have created the external swf files but the problem is when I try to set the font name in the ActionScript. It just doesn't display the right font.

I would appreciate if someone can help.


Thank you!

Dynamic Text Embeding Fonts 8(
I am rebuilding our site so that people who don't know anything about flash can update any text on the site via xml files. So the text has to be dynamic. I am currently creating all the text fields in action script and populating them dynamically. That part works fine. Where I am having a hard time is getting the fonts in these text fields to embed.

I have tried a few things. First thing I tried was just creating a text box off stage in the actual authoring environment (drawing environment) with the font and setting that text box to embed all the capitol, lowercase and puncuation sets for the font. That didn't do the trick (though it seems like it should). So the next thing I have tried is using the textField.embedFonts=true; statement.

tween_MC.createTextField("news",1,0,0,200,200);
tween_MC.news.multiline=true;
tween_MC.news.wordWrap=true;
tween_MC.news.html=true;
tween_MC.embedFonts=true;
//tween_MC.news.setTextFormat(style_ticker);
tween_MC.news.htmlText="Looking for a strange font";
tween_MC.news.setTextFormat(style);

Here is the stub code that I test with. Of course on my computer it looks fine because I have the font that is described in style. However, if I view the online version on a different computer the text box has a default system font.

Anybody who knows how to fix this would be my new best friend 8). Thanks in advance to any who take the time to read this and reply.

Danny

Embeding Fonts In Mx.controls.DataGrid
hi,
i have a problem in embedFonts for the DataGrid..
How could i solve this?
I have used MyGrid.setStyle("embedFonts",true); but i dont find the use..
Please help me???

Mask Component And Fonts Embeding
HI,

I am using Flash 8 and their V2 components. This is my fist time using them to build a form and am having problems.

I want to have a movie clip with the form inside it so it can scroll. I am assigning the mask on the timeline, but when I do that none of the text displays in the form fields or dropdown boxes.

How do I tell the form fields to embed the fonts?

Thanks,
Steven

I Have A Problem Embeding Fonts In A TextArea
Hi everybody,

I have a textArea component in my flash.

If I try to embed a font from the same file, it works sweetly.

Ah, but when I try to embed a font from a font symbol imported from a shared library, it just doesn't work anymore.

Could anyone help me out with this?

Thank you very much for your help,

Peace,
Cayo Hueso

Pixel Fonts Embeding Mystery
I am using pixel fonts for some nice crisp fonts.

They work fine and i know all about snap to pixel etc.

When i first preview within flash all looks fine however, when i view the swf although crips they just dont look the same somthing has happened and they look abit poo.

So i embed the fonts however, this time when i preview in flash and view the swf the type looks faded. For example white type is is faded to almost grey.

It seems to be happening with external swf, might this have something to do with it?

Any ideas?

Thanks for any help

Cheers

Embeding Fonts XML CSS Bold Italic
Hi All,

I've been trying everything with this issue so thought I'd put it out there to see if anyone can offer a solution or even advise if this is possible or not.

This is the scenario:

I dynamically create a textField.
I load an external CSS file into a stylesheet.
From an XML file I load HTML content into the textField via .htmlText
I have added the font to the library and have made it available for Export for ActionScript

The HTML has spans with classes eg:
<span class="boldText">Flash Flash Flash</span>

The CSS states:
.boldtext {
font-family:Anivers;
font-style:italic;
font-weight:bold;
font-size:16px;
}

IMPORTANT NOTE: The font I'm using does not have any other family members like bold or italic

Here is the problem.

Leaving embedFonts = false things work just fine. But obviously I need to embed this font so all can see it.

As soon as i set embedFonts = true I no longer get bold or italic.

Is this a case of because the font does not have a bold or italic the system it just rendering, or am I just missing something? For example the checkboxes in the font's properties where you can choose bold and italic. I tried these but no luck.

Any help would be greatly appreciated.

Regards,
jkaris

Embeding Fonts For Dynamically Created TextFields
I've tried to search for an answer but i've come up empty handed. I know the embedFont for the text format embeds the font, but i can't get it to work. What is that syntax actually doing...? Is it embedding the font from my harddrive when i publish the movie or is it looking for the font from the users hard drive and embedding it from there?

I'm using pixel font's so this is particularly cruciual.

Thanks

Embeding Fonts - Limiting The Embeded Range
So I'm using the Flex SDK 2 in combination with Flash Develop 3 Beta and all is good (actually FD3 is great if you haven't checked it out then do so). I need to embed some fonts but I only need a small range a-z A-Z 1-9 so I'm trying to get the mxmlc.exe compiler option

-compiler.fonts.languages.language-range <lang> <range>

e.g.

-compiler.fonts.languages.language-range englishRange U+0041-U+007E

and also adding the following to flex-config.xml

<languages>
<language-range>
<lang>englishRange</lang>
<range>U+0041-U+007E</range>
</language-range>
</languages>

but nothing seems to affect the size of my SWF.

Anybody got this working?

Fonts Under Masks?
I need to have a scrolling dynamic text field under a mask but I want a sharp font with tiny file size so I won't be using outlines.
I understand you can't see a non embedded font under masks. Any work arounds?

Thanx

CR0M

Question About Pixel Fonts And Masks
I have a pixel font which is a graphic symbol that is on whole numbers. It appears nice and crisp, but when a mask is done over top of it; the pixel font looks blurry. The swf file that is produced from the fla looks clean and crispy. Why is this? It is not really a trouble issue but confusing because the screen tells me one thing and the output shows something else.

Dynamic Text, Masks, And Shared Fonts
I'm having a problem with using dynamic text fields with layer masks.

Basically I'm try to have a gradiant on a dynamic text string. So the text is my mask, and the gradiant is my base layer.

I realize that I have to embed the font. When I embed the font, it works. However, I want to seperate the font into an external font library so that I can use the font in multiple swf's. As soon as I externalize the embedded font into a shared font library, the layer mask stops working.

Question: Can I use layer masks on dynamic text fields while using a shared font library? If so... how? Thanks a bunch.

-Mike

Please - Embedded Fonts With Dynamic Textboxes (and Masks)
Hey,

I've been teaching myself Flash for a few weeks (Flash 5). This site has been a fantastic help - with the example .fla files - thanks a lot to all of you!

I need help with text in my Flash movie, found at SMRTJ
The source file is here


I have the content of each page in a movieclip which fades in (as a motion tween) and fades out (by actionscript). The "content" movieclips contain the textboxes which have variables "text1" to "text5" i.e. they are dynamic textboxes with the strings being loaded into those variables from an external .txt file. I have chosen to allow HTML tags so that the admin guy can make bold and italic characters when editing the external text files.

If I embed the entire font (garamond) while allowing HTML, parts of the text disappears! I.e. any numbers in bold and italicised text. I can recover the italicised text by setting the property of the textbox itself to "italic."

I can live with the present situation, but it strikes me as very odd. I'd love anyone to explain this to me.

Further - I'm also trying to mask dynamic text. I'm sure I'll have lots of fun embedding that! I want to use the text itself as the mask and have a white box behind it with an alpha gradient; this way, the text will fade onto the screen as it is scrolled. You can see what I mean on the "Style" page of my site, although this only static text yet. I'd appreciate any pointers on this too.

Thanks a lot for your help!

Chris
----------------------------
"Some people bring hapiness wherever they go; others, whenever." Oscar Wilde (I think?)

HTML Text And Embed Fonts Issue With Masks?
Alright, I need help here, Ive been trying all day to figure this damm thing out.

What I have is a dynamic textbox within a movie clip.

The textboxes INSTANCE name is "newsBox" (no quotes) and the movie clips instance name is "newsClip"


newsClip is being masked by a rectangle shape. Now as everyone knows (or will soon find out), you need to embed the font outline for a dynamic textbox to work when being masked. That is all well and good... BUT.... and it is a big but.... When you want to render the text as html and read it as htmlText it doesn't work!!!!!

Am I to assume that you can't use HTML formatted text in a masked clip with a textbox? If so this really friggin sucks because it defeats the whole purpose of what I was trying to do!!

Is this a bug in Flash? Is there a reason they did this? Is there a way around it?

¿How To Enlarge Masks On Rollover While Shrinking Other Nearby Masks?
Hi,

I'm trying to figure out how to acheive a similar effect to the main 4 buttons, at this site, http://www.nationalgeographic.com/forcesofnature/

There is a grid of 4 rectangles, each quadrant is a mask/button. When you rollover one quadrant, the mask/button enlarges, and the other 3 mask/buttons shrink. This all happens inside of the fixed-size grid.

Can anybody lead me in the direction of a tutorial or let me know the name of the technique so I can search out help resources on my own?

Thanks in advance...
kp

Embeding
Hey,
I need to know if there's a way for a swf to be read from inside another swf file.
Thanks,
Lemme Know.

Embeding
How do I embed a .swf file into a webpage?

Embeding Swf
Been up all night racking my brain and the net on how to embed a swf signature into my forum posts...

I cant find anything on this. I have made my swf and its views fine in the browsers..

Is there some mod or something i have to install on the forum to be able to embed. ?

thanks =)

Embeding A Swf In Another Swf
Hello, heres what I'm looking to do:

I am trying to create a project completely in flash player, however its very large (its basically a tutorial for a coding language called "magic")

I want to seperate it out a bit, basically one main flash file that acts as a menu system with buttons to send you to different sections of the tutorial, and then I want to make a bunch of individual flash files for each page of those sections.

How would I go about calling a swf from within a swf file, or preferably embedding multiple swf files into the main swf file.

This would allow me to make a bunch of complicated timeline animations without having a completely unmanageable single timeline.

Or if you have another possible suggestion on how to more easily seperate functions/animations I'm certainly open to other idea's. Thank you in advance!

Embeding A 3d Pic
i already have the file of the 360 pic. It is in a quicktime movie format. My problem is that when i embed this only one pictureee shows up and when move the mouse in it it doesn't work...
When i put the movie on the time line a series of keyframes appear but still does not work
is there an action script for this. or am i doing it all wrong

Copyright © 2005-08 www.BigResource.com, All rights reserved