The Daily Click ::. Forums ::. Klik Coding Help ::. Replace text with an object's string value
 

Post Reply  Post Oekaki 
 

Posted By Message

joelr_2000



Registered
  22/02/2004
Points
  687
7th January, 2013 at 07/01/2013 07:05:43 -

This is probably a really obvious one for most of you, but really having trouble working this out..

How can I replace/add text in a 'formatted text' object from another object's string value.

I've tried-
<Start of Level> : Load -> Insert String -> Retrieve from object (chose object 1)-> Values -> Alterable strings -> Alterable Sting A..

I have also made sure the string is set..
<Always> : Set Alterable String A to "blah" (for object 1)

..to no avail. Please let me know asap- drivin me up the wall

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
7th January, 2013 at 07/01/2013 14:32:30 -

You need to specify where to insert the text first (even if the object doesn't contain any other text).

eg.
+ Start of frame
-> Select word num*: 1
-> Insert string: Alterable String A("Active")

* "Select all", "select line", etc would all work equally well.

 
n/a

joelr_2000



Registered
  22/02/2004
Points
  687
7th January, 2013 at 07/01/2013 22:57:14 -

Awesomeness- that's cracked that case, cheers for that.

Now for the follow up and possibly dumber question: How can I set the font for the text that's inserted. There doesn't seem to be an option for this under the the 'Fromatted Text's actions. It keeps inserting the text as Times New Roman, and the font that's set in the actual object is something compleletly different (Arial).

What have I done wrong here?

 
n/a

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
16th February, 2013 at 16/02/2013 22:54:04 -

Typeface information won't copy over.
You can manually set the string object to display a different font by accessing it's properties in the level editor, but if you want to keep the correct font, you'll need to find some way to convert your document into an RTF document and load it with the Rich Edit Object. That should preserve font face, size, color, and accents.

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
   

Post Reply



 



Advertisement

Worth A Click