Ask a Question related to Macromedia Director Lingo, Design and Development.
-
Christian Grass #1
Re: unrecognised character instead of Line break??
I had the same problem. Windows & Mac use different linebreaks.
Windows needs a pair of numToChar(13) and numToChar(10) to recognize as
RETURN.
That is to say: it needs linefeed AND carriage-return.
You can use my script to clean up your text before writing it to a
textfile:
yourFieldText = member(yourFieldName).text
textToWrite = cleanOutput(yourFieldText)
------------------------------------------------
-- convert field text so that notepad can read it correctly
on cleanOutput oldText
CRLF = numToChar(13) & numToChar(10)
newText = ""
repeat with n = 1 to the number of lines in oldText
if n = 1 then
set newText = line n of oldText
else
set newText = newText & CRLF & line n of oldText
end if
end repeat
return newText
end
-------------------------------------------------
chris
On Sat, 6 Dec 2003 01:27:47 -0800, Ramesh <zobble@hotmail.com> wrote:
> Hi,
>
> I am working on a file in director, where the content is coming from a
> flash file which is embedded in the flash file.
>
> I am storing the value in the textbox named TextHolder by using the
> following code.
> member("TextHolder").text= getVariable( sprite "SuccessMeter" ,
> "mytextvalue" )
>
> The value coming from the flash has line breaks. It shows perfectly
> right in the Flash as well as in the Director TextBox.
> But when i store the values of the textbox of Director to a external Txt
> file, it puts unrecognised character in place of the line break. The
> file is no more readable by flash.
>
> I need to replace the unrecognised character with a line break. Please
> Help!!
>
> If someone can give me a sample file or a link where i can get more
> info.. it will be great help.
>
> Thanks in advance,
> Gunjan
>Christian Grass Guest
-
line break
I can't seem to get the line break to work in Contribute, so when I hit SHIFT + ENTER, it still gives a Paragraph tag. According to the help, it... -
Forced line break changes previous line endings
Gang-- Give this script a try. It's quite experimental (i.e., use at your own risk), but in my tests it actually works to "freeze" the line... -
How to write a page break character.- one more question
Hi, I have one more requirement, The last STATUS which occurs just prior to the file end should not be followed by a page break character. How... -
How to write a page break character.
Hi, I want to search for the word "status" in a group of files in a directory and replace it with "status\n^L" where ^L is a page break... -
Invalid character instead of Line break??
you might hae to replace return chars numToChar(13) with linfeeds numToChar(10) -
Christian Grass #2
Re: unrecognised character instead of Line break??
I had the same problem. Windows & Mac use different linebreaks.
Windows needs a pair of numToChar(13) and numToChar(10) to recognize as
RETURN.
That is to say: it needs linefeed AND carriage-return.
You can use my script to clean up your text before writing it to a
textfile:
yourFieldText = member(yourFieldName).text
textToWrite = cleanOutput(yourFieldText)
------------------------------------------------
-- convert field text so that notepad can read it correctly
on cleanOutput oldText
CRLF = numToChar(13) & numToChar(10)
newText = ""
repeat with n = 1 to the number of lines in oldText
if n = 1 then
set newText = line n of oldText
else
set newText = newText & CRLF & line n of oldText
end if
end repeat
return newText
end
-------------------------------------------------
chris
On Sat, 6 Dec 2003 01:27:47 -0800, Ramesh <zobble@hotmail.com> wrote:
> Hi,
>
> I am working on a file in director, where the content is coming from a
> flash file which is embedded in the flash file.
>
> I am storing the value in the textbox named TextHolder by using the
> following code.
> member("TextHolder").text= getVariable( sprite "SuccessMeter" ,
> "mytextvalue" )
>
> The value coming from the flash has line breaks. It shows perfectly
> right in the Flash as well as in the Director TextBox.
> But when i store the values of the textbox of Director to a external Txt
> file, it puts unrecognised character in place of the line break. The
> file is no more readable by flash.
>
> I need to replace the unrecognised character with a line break. Please
> Help!!
>
> If someone can give me a sample file or a link where i can get more
> info.. it will be great help.
>
> Thanks in advance,
> Gunjan
>Christian Grass Guest
-
Ramesh #3
unrecognised character instead of Line break??
Hi,
I am working on a file in director, where the content is coming from a flash file which is embedded in the flash file.
I am storing the value in the textbox named TextHolder by using the following code.
member("TextHolder").text= getVariable( sprite "SuccessMeter" , "mytextvalue" )
The value coming from the flash has line breaks. It shows perfectly right in the Flash as well as in the Director TextBox.
But when i store the values of the textbox of Director to a external Txt file, it puts unrecognised character in place of the line break. The file is no more readable by flash.
I need to replace the unrecognised character with a line break. Please Help!!
If someone can give me a sample file or a link where i can get more info.. it will be great help.
Thanks in advance,
Gunjan
Ramesh Guest



Reply With Quote

