-
1. Re: Formatted text file Into TextMember with Scrolling... Problem.
SeanWilson Oct 17, 2014 7:42 PM (in response to GRAMOPHONE)member("MyTEXT").importFileInto(_movie.path & "mytext.rtf")
member("MyTEXT").boxType = #scroll
-
2. Re: Formatted text file Into TextMember with Scrolling... Problem.
GRAMOPHONE Oct 18, 2014 10:15 AM (in response to SeanWilson)Hi Sean, It's been a while.
Yes, now I have the scroll, BUT...
Look at this:
My member is a field... and It has to be a field and when the RTF is imported, it becomes a text member. I tried THIS, but it doesn't work.
member("MyTEXT").importFileInto(_movie.path & "mytext.rtf")
member("MyTEXT").boxType = #scroll
member("MyTEXT").type = #field
It there any way to solve this?
Thanks
-
3. Re: Formatted text file Into TextMember with Scrolling... Problem.
SeanWilson Oct 18, 2014 1:08 PM (in response to GRAMOPHONE)You can't import formatted text into a #field - that's not the way the field member type works, it doesn't support any formatting. Please explain why you say:
and It has to be a field … when the RTF is imported
-
4. Re: Formatted text file Into TextMember with Scrolling... Problem.
GRAMOPHONE Oct 18, 2014 4:28 PM (in response to SeanWilson)Then how can I select theMouseLine in a text member? So I can use the content of the mouseline as a var.
I have an old Behavior to hilite and select the mouseLine, but it only works on "Field" members.
Any way to do this in a text member?
Thanks
-
5. Re: Re: Formatted text file Into TextMember with Scrolling... Problem.
SeanWilson Oct 20, 2014 12:43 AM (in response to GRAMOPHONE)Try the following, or some snippet or re-working of it, attached to your #text sprite:
property spriteNum property my property myMember on beginSprite me my = sprite(spriteNum) myMember = my.member end on mouseUp me if ( myMember.text = EMPTY ) then exit tLoc = _mouse.mouseLoc - my.loc tPos = myMember.locVToLinePos(tLoc[2]) nChars = 0 repeat with l = 1 to tPos nChars = nChars + myMember.line[l].char.count -- account for RETURN at line end if l < tPos then nChars = nChars + 1 end repeat if tLoc[2] < myMember.charPosToLoc(nChars)[2] then tClickedLine = tPos + myMember.scrollTop/myMember.fixedLineSpace end if PUT tPos, tClickedLine end
-
6. Re: Formatted text file Into TextMember with Scrolling... Problem.
rduane Nov 2, 2014 7:02 AM (in response to GRAMOPHONE)


