The Daily Click ::. Forums ::. Klik Coding Help ::. Text effect help needed!
 

Post Reply  Post Oekaki 
 

Posted By Message

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
14th December, 2006 at 07:19:52 -

Well i'm making chat program where you can text can be colored so i use edit box but i dont want to do 2 edit boxes or something. Because i need to colour like half of my text or some words only.

Like: Hello! my name is ...
Hello!<--(blue) My name is ... <--- (Black)

In this point i want to get the hello! into different colour as the last part of the text. So what i need is to code so i does this automatically or user can do this by him(her)self by coloring the word(s) and pushing some button. I can code the button (-_-), but what i need is a way to do it without other words would not be colorized too. Also the automatically thing would be nice.

Althought is it even possible to make it with one edit box?



 
I have proven new mathematic formula to be true...

2D > 3D

Image


axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
14th December, 2006 at 08:10:44 -

Yeah, I get what you mean. You'll need MMF, and the Rich Edit object. Rich Edit can change font color at any time. So just do like this:

* Event
- Rich Edit: set font color to (blue)
- Rich Edit: set text to "Hello! "
- Rich Edit: set font color to (black)
- Rich Edit: set text to "My name is..."

There's also an action that lets you set font color from a string (like "0,0,255" for blue. You know, RGB), if you want to let the user change the color theme. Note that the Rich Edit object's set text action doesn't actually SET the text to the input string, but adds it to the existing text (don't ask me why, it's stupid).

 
n/a

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
14th December, 2006 at 10:52:16 -

Hmm, ok i tried the thingy and changed the edit box to rich edit box, ty for help!

 
I have proven new mathematic formula to be true...

2D > 3D

Image


NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
14th December, 2006 at 12:25:53 -

Still I have one problem, when others talk like bla bla bla and then they want to save their talkings (which are in rich edit object). And the question is how to save the talkings into .txt for example. I looked mmf objects and finded object named file. So is it the right object to use and how I use it (or use other), also if someone needs to be loading stuff from .txt files for example to the screen that is also a problem, but I thing I can handle it when I learn to save those texts. So can someone tell how to do that too?

 
I have proven new mathematic formula to be true...

2D > 3D

Image


axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
14th December, 2006 at 15:52:17 -

The Rich Edit object has already got built-in functions to save/load both ASCII (*.txt) and RTF (*.rtf) text. Use those

 
n/a

X_Sheep

I had a custom rating before it was cool

Registered
  01/03/2004
Points
  1313

VIP MemberPicture Me This -Round 23- Winner!Dos Rules!
14th December, 2006 at 16:20:08 -

I think it doesn't save the color settings when you save as a txt. rtf does though.

 
a/n

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
15th December, 2006 at 02:51:21 -

Yup. TXT will only save the text itself, not the formatting. So it really depends on what you want.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click