00:00
00:00
Newgrounds Background Image Theme

markololohands just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

dynamic textbox with strange result

1,181 Views | 2 Replies
New Topic Respond to this Topic

(AS2):
I have created an function to quickly change the text inside a textbox, but the results are a bit strange
The textboxes are inside of movieclips, like you can see in the function.
I cant even change the text without the funktion and there is nothing, that could interfere with the menu

Do i have to clear the cache or something?
but the cache of what? web browser or something else?

function:

setMenuText = function(btn1:String, btn2:String, btn3:String, btn4:String){
btn_1.btn_text.text = btn1;
btn_2.btn_text.text = btn2;
btn_3.btn_text.text = btn3;
btn_4.btn_text.text = btn4;
}

call:

setMenuText("Start Game","Coop Game","Options","Website");

result is shown in the attachment.

dynamic textbox with strange result


The problem is that your font is not embedded correctly.

https://helpx.adobe.com/flash/using/embed-fonts-consistent-text-appearance.html

EDIT: Or more probably now I look it, I'd say the font you're using doesn't have capital letters. Try this insead:

setMenuText("start game","coop game","options","website");

The water in Majorca don't taste like what it oughta.

| AS3: Main | AS2: Main | Flash Tutorials |

BBS Signature

Response to dynamic textbox with strange result 2015-06-25 07:19:57


At 6/25/15 07:06 AM, Kirk-Cocaine wrote: The problem is that your font is not embedded correctly.

https://helpx.adobe.com/flash/using/embed-fonts-consistent-text-appearance.html

EDIT: Or more probably now I look it, I'd say the font you're using doesn't have capital letters. Try this insead:

setMenuText("start game","coop game","options","website");

oh you're right.
Not sure how i could oversee it >.<

And the rest of the missing letters were also solved by correcting the embedding.
thank you very much =D