ForumsProgramming ForumSome Text in AS2 Help Needed

5 2768
SpyreWorks
offline
SpyreWorks
172 posts
Nomad

This is in AS2!

Well, I made an input textbox and I want whatever the person types in to appear at a point later in the game (I'm making an RPG game :P). However, when I did it my way, the text would appear later on, but it would be in the same color, size and font as when you typed it in.

Basically I want this to happen:

Some types in 'Name1' in input textbox with size and color A and A.

'Name1' shows later in the game, above an HP bar or something, has the same text, but is with a different size and color.

If anyone could help out I'd appreciate that :P

  • 5 Replies
PixelSmash
offline
PixelSmash
566 posts
Nomad

Well, since you didn't say how you did it... I'll just give it a wild shot

Can't you simply store the text to a string variable, and then load it into the second dynamic text box? This would negate any formatting you did on the input textbox, and simply use the formatting of your second textbox.

Frankly, I doubt I could do what you did even if I tried it Let me know if it helps! I haven't used input textboxes that often, so I'm not completely sure.

SpyreWorks
offline
SpyreWorks
172 posts
Nomad

I tried that but it didn't seem to work.
If someone could give me some more exact instructions that would be appreciated :P

dank
offline
dank
986 posts
Peasant

Just save it in a variable. You could reset the properties, but that just doesn't make sense.

PixelSmash
offline
PixelSmash
566 posts
Nomad

Can you perhaps post the code you used? It could be that something else is wrong Plus, it makes it easier for all since we can actually see what we're talking about!

dank
offline
dank
986 posts
Peasant

var NAME:String;

then save it when the user has typed it in, usually before leaving the frame:

NAME = textBox.text;

Showing 1-5 of 5