Is it simply a question of setting member.tabs once imported? Is your RTF saved from Wordpad, or Word, or something else? Which version of Director are you using? Are you importing at runtime or while authoring a file? If at runtime, how are you importing it?
thanks loads for taking the time to look at my problem.
I am using Director 11.5 on a PC, Windows XP
The file being imported is a WordPad RTF
The file is being imported at runtime, as the RTF loaded will depend on what the user clicks, I am using the FileIO xtra to import the RTF file into a placeholder cast member.
Any chance you can make the RTF file available?
I have given this a try, but get an error saying "Value out of range"
theWords = member("answers")
theWords.tabs = [#type: #left, #position:112]
Because the #tabs property should be a linear list of property lists:
put member(1).tabs -- [[#type: #left, #position: 50], [#type: #left, #position: 100]]
Here's a behavior that I tested in D10 that works.
-- RTF file reader
On GetBehaviorDescription me
return "RTF file reader"
On GetPropertyDescriptionList me
Props = [:]
Props[#pFilePath] = [#default:_movie.path, #format:#string, #comment:"Path to RTF file."]
on beginSprite me
pMe = sprite(me.spriteNum)
on mouseUp me
IO = new (xtra "FileIO")
Error = IO.status()
if Error then
alert "Error opening RTF file. For sprite " & me.spritenum & "."
RtfText = IO.readFile()
pMe.member.rtf = RtfText
I did my orginal tests with Word saved out as RTF. I just did a test with WordPad saved out as RTF and it is not correct.
WordPad may be the source of your problems.
thanks for the reply. So should try the behaviour you suggested with a Word RTF?
Yes. I would recommend using Word to create your document and then save it out as rtf.
Thanks so much for all your help, it has worked perfectly.
These forums are a God send for users like me.
Thank you very much