I have a site im working on at
http://www.rakerecords.com
Here is my problem…
I have in the news section, the bndssection and the contact page a text effect where the text types in letter by letter.
I am using the modified code of some body elses idea and here it is.
[AS]
q = 1;
text = “TEXT GOES HERE”;
myInterval = setInterval(calculate2, 5);
calculate2();
function calculate2(){
if (q < text.length) {
textbox = text.substring(0, q);
q++
} else {
textbox = text;
clearInterval(calculate2);
}
}
stop();[/AS]
Problem is as you will see if you look at the site , is this text is dynamic and not embedded. Therefore the system font displays , being times new roman and that looks terrible.
How can i get this function to work with embedded fonts, when i embed the font, the effect doesnt work.
I have even tried putting a fake invisible dynamic text box at the beggining with the font embedded there , that doesnt work either.
Or is there a better way of doing this effect with embedded fonts? or maybe typing all the font characters into an invisible static text box and use device fonts?? or maybe attach the font file to movie in some other way so the user has that font (as it works fine on my PC which obviously has the said font on it)
Any ideas welcom as this is last thing i have to sort out before i start adding content properly, but i cant til i have this sorted and i dont want to drop the text effect if possible.
ok i’m assuming “textbox” is your dynamic text box right? when you export the font, do you include all the characters from the font? there is a button with that option that looks like this: “[…]”
if you click that button, the entire font gets enbedded. that may be your problem, because your code looks fine.
its ok i figured out my prob,
i hunted about and found that its flashes fault
in the code i printed i omitted the fact that im having it appear as formatted HTML
And flash will always display HTML text in system font (it would require the user to have the exact font installed on their PC to work)
I have kind of sorted it with this modified code:
[AS]q = 1;
text = “TEXT”;
text +=newline+newline;
text +=“TEXT”;
text +=newline+newline;
text +=“TEXT”;
text +=newline+newline;
text +=“TEXT”;
text +=newline;
text +=“TEXT”;
text +=newline;
text +=“TEXT”;
text +=newline+newline;
text +=“TEXT”;
text +=newline;
text +=“TEXT”;
text +=newline;
text +=“TEXT”;
text +=newline;
text +=“TEXT”;
myInterval = setInterval(calculate2, 5);
calculate2();
function calculate2(){
if (q < text.length) {
textbox = text.substring(0, q);
q++
} else {
textbox = text;
clearInterval(calculate2);
}
}
stop();[/AS]
so basically now its not html but i made line breaks with the newline option.
However the embedde Pixel font still looks different to the static version of itself.
I may just make all the text embedded and dynamic so it is at least unform, or is there a way of embedding a font to display formatted HTML in flash.
If there is i havent found so any ideas welcome cheers