Ask a Question related to Macromedia Director Basics, Design and Development.
-
kiaoraFiona webforumsuser@macromedia.com #1
changing a text members text content with lingo
Is there a way of setting the content of a text member through lingo, specifying where there should be Carriage Return.
I have a director movie that when you press a button, a string should appear in the text box on screen, but the layout is very poor, in that there is no paragraphs.
Is there any way to tell lingo that at a certain point in the text a new line needs to be made.
It has to be done through lingo as the text is made up from the result of a search on a property list.
repeat with i =1 to movieList.count
if movieList> movieList.count then
if movieList.name = member("input").text then
-----------
charNo = the number of chars in member("text").text
member("text").char[(charNo+1)] = string(i)&"."&& string(movieList.name)
----------
this is the part above that I am trying to adjust the layout. After each loop, if the users input equals the property in the list then it outputs the name to the text field after the last charcter that is already there.
Is there a symbol for entering carridge-return, or is there a way in director to assign ascii code?
Any ideas would be great.
kiaoraFiona webforumsuser@macromedia.com Guest
-
changing dynamic text content on attachMovie
I have a MC that is brought on stage via attachMovie. The MC has a dynamic text that is defined on the attach action. My problem is I would like to... -
identifying text members via lingo.
i have a movie with several scrollable text members. For each of these i want to set the scroll top so that they are automatically displayed at the... -
Odp: identifying text members via lingo.
Yes.... Go thru the loop of members and check if actual member type is #text... if it is do what you want to do with him regards lukpcn -
changing text foreColor through Lingo
Ideally using a "on mouseOver me" command. This is what I've got so far with no results: on mouseOver me sprite(5).forecolor = #FFFFFF end ... -
Changing the Font of a text char w/ lingo
change Wingding to Wingdings missing s is causing problems otherwise your just fine ;) hope this helps gabriel -
Nick Gordon #2
Re: changing a text members text content with lingo
I know you can format your text using the html property
Then the text in your propertylist is actually the html text. so format your text following HTML language. In Lingo you just set the textfield property to HTML. It read then your original text as HTML and you have a lot of
control of your text. However crossplatform issues may occur.
Nick
"\"kiaoraFiona\" webforumsuser"@macromedia.com wrote:
> Is there a way of setting the content of a text member through lingo, specifying where there should be Carriage Return.
>
> I have a director movie that when you press a button, a string should appear in the text box on screen, but the layout is very poor, in that there is no paragraphs.
>
> Is there any way to tell lingo that at a certain point in the text a new line needs to be made.
>
> It has to be done through lingo as the text is made up from the result of a search on a property list.
>
> repeat with i =1 to movieList.count
> if movieList> movieList.count then
>
>
> if movieList.name = member("input").text then
>
> -----------
> charNo = the number of chars in member("text").text
> member("text").char[(charNo+1)] = string(i)&"."&& string(movieList.name)
> ----------
>
> this is the part above that I am trying to adjust the layout. After each loop, if the users input equals the property in the list then it outputs the name to the text field after the last charcter that is already there.
>
> Is there a symbol for entering carridge-return, or is there a way in director to assign ascii code?
> Any ideas would be great.
>
>Nick Gordon Guest
-
Rob Dillon #3
Re: changing a text members text content with lingo
It sounds like you want to add something to the text that already
exists in a text member. You can do that by just adding the text:
member(X).text = member(X).text & newString
If you want to add a carriage return to the text:
member(X).text = member(X).text & RETURN & newString
--
Rob
_______
Rob Dillon
Team Macromedia
[url]http://www.ddg-designs.com[/url]
412-243-9119
[url]http://www.macromedia.com/software/trial/[/url]
Rob Dillon Guest
-
Nick Gordon #4
Re: changing a text members text content with lingo
I tried something with CharToNum and found asci for return is 13.
So the following may work as well.
Convert your text to asci and have the values put in a list. So
"I like the way you cook!" becomes
[73, 32, 108, 105, 107, 101, 116, 104, 101, 32, 119, 97, 121, 121, 111, 117, 32, 99, 111, 111, 107, 33]
Now you can add the carriage return which is 13
[73, 32, 108, 105, 107,13, 101, 116, 104, 101, 32, 119, 97, 121, 13, 121, 111, 117, 32, 99, 111, 111, 107,13, 33]
NumToChar will get you this
I like
the way
you cook
!
But it a little tedious
Nick
"\"kiaoraFiona\" webforumsuser"@macromedia.com wrote:
> Is there a way of setting the content of a text member through lingo, specifying where there should be Carriage Return.
>
> I have a director movie that when you press a button, a string should appear in the text box on screen, but the layout is very poor, in that there is no paragraphs.
>
> Is there any way to tell lingo that at a certain point in the text a new line needs to be made.
>
> It has to be done through lingo as the text is made up from the result of a search on a property list.
>
> repeat with i =1 to movieList.count
> if movieList> movieList.count then
>
>
> if movieList.name = member("input").text then
>
> -----------
> charNo = the number of chars in member("text").text
> member("text").char[(charNo+1)] = string(i)&"."&& string(movieList.name)
> ----------
>
> this is the part above that I am trying to adjust the layout. After each loop, if the users input equals the property in the list then it outputs the name to the text field after the last charcter that is already there.
>
> Is there a symbol for entering carridge-return, or is there a way in director to assign ascii code?
> Any ideas would be great.
>
>Nick Gordon Guest
-
Nick Gordon #5
Re: changing a text members text content with lingo
If there was no MacromediaTeam...
I'll have to take a first look at these 'constants'
Nick
Rob Dillon wrote:
> It sounds like you want to add something to the text that already
> exists in a text member. You can do that by just adding the text:
>
> member(X).text = member(X).text & newString
>
> If you want to add a carriage return to the text:
>
> member(X).text = member(X).text & RETURN & newString
>
> --
> Rob
> _______
> Rob Dillon
> Team Macromedia
> [url]http://www.ddg-designs.com[/url]
> 412-243-9119
>
> [url]http://www.macromedia.com/software/trial/[/url]Nick Gordon Guest
-
srsidman webforumsuser@macromedia.com #6
Re: changing a text members text content with lingo
TO add a carriage return, you simply have to use the RETURN command...for instance:
on startMovie me
member("myText").text = "Hello,"&RETURN&"How are you?"
end
In the text member named "myText", the code would print out:
Hello,
How are you?
Hopefully that makes sense...
Good luck.
srsidman webforumsuser@macromedia.com Guest
-
kiaoraFiona webforumsuser@macromedia.com #7
Re: changing a text members text content with lingo
Thank you everyone for all your help,
I used the RETURN keyword and it works wonders for what I wanted to do.
kiaoraFiona webforumsuser@macromedia.com Guest



Reply With Quote

