 |
Godlike |
 |
Joined: November 12th, 2005, 1:56 am Posts: 1474 Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
|
Jammy,
Here's another approach. But instead of using 3 Text Objects, use one and resize it (plus have an additional hidden Text box).
First, set up the 'hidden' Text Object making sure it uses the same font and size you will use for displayed text. Make this object long enough for the longest word you anticipate. Let's call this Text000
Insert your variable, for example, TheWord1.
The rest is simply a matter of finding the X-coordinate of the last character in Text000. e.g., var charInfo = Text000.PointFromChar(String.length(TheWord1) -1) //you need to verify this, test this to make sure of using correct zero-based index.
Now, supposing you have created that one Text Object to display the text using the same TheWord1 variable... call it TextObj01, resize it to lengthen or shorten its width. Hint: Use charInfo.x from above.
How to resize TextObj01? Do a search on the forum for 'SetObjectSize'. There are a couple other ways to change the object's dimensions and position. But you get the idea.
_________________ _good things come to those who wait(0)_
|
|