Ask a Question related to Macromedia Director Lingo, Design and Development.
-
Richie Bisset #1
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 top of the text.
obviously i can do this individually, but i was wondering if there
were some way, within the start movie handler, to list all the members
in the movie, determine which are text and then set the scroll top
value from there.
any help would be appreciated.
regards,
richie
Richie Bisset Guest
-
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 -
Need help with text members
I have some problems with some textfiels. Lets say i have a couple of textfields. These fields needs to be editable, (and so they are) but the fields... -
Lingo checking cuepoints, changing members
If I'm reading this correctly, you want to have a sprite display a member based on where the play head is in a digital video file. If that's what... -
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... -
[Q] Self-relationships and identifying family members
Given a DB of Names, Addresses, and the usual sort of people information I would like to add a field that indidcates which records belong to the... -
Richie Bisset #2
Re: Odp: identifying text members via lingo.
thanks luk,
can i ask two more questions though. Firstly, i should know how to do
this but how do you loop through the members with lingo? tehre is no
member list property or anything like that i'm aware of.
secondly, as far as i can see in the LD there is no support for #text
with the ilk command, so how would i detect the type anyway.
thanks for your help.
richie
On Thu, 20 Nov 2003 13:19:51 +0100, "luk"
<lukpcnUSUNTO@poczta.onet.pl> wrote:
>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
>
>
>Użytkownik Richie Bisset <richie@rocket.nospam.co.uk> w wiadomooci do grup
>dyskusyjnych napisał:7kbprv8io0pnur9oihrn39a9stpbolae2o@4ax.com ...>>> 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 top of the text.
>>
>> obviously i can do this individually, but i was wondering if there
>> were some way, within the start movie handler, to list all the members
>> in the movie, determine which are text and then set the scroll top
>> value from there.
>>
>> any help would be appreciated.
>>
>> regards,
>>
>> richieRichie Bisset Guest
-
Andrew Morton #3
Re: Odp: identifying text members via lingo.
nCasts=the number of castLibs
repeat with c=1 to nCasts
n=the number of members of castLib c
repeat with mem=1 to n
if the type of member(mem, c)=#text then
-- whatever
end if
end repeat
end repeat
Andrew
Andrew Morton Guest
-
Richie Bisset #4
Re: Odp: identifying text members via lingo.
Thanks to both of you. That is perfect. I really shoulf have known
that.
What is the distinction between ilk and type though? i'd just been
trying to use ilk up to this point.
cheers,
richie
On Thu, 20 Nov 2003 12:38:07 -0000, "Andrew Morton"
<akm@in-press.co.uk.invalid> wrote:
>nCasts=the number of castLibs
>repeat with c=1 to nCasts
> n=the number of members of castLib c
> repeat with mem=1 to n
> if the type of member(mem, c)=#text then
> -- whatever
> end if
> end repeat
>end repeat
>
>AndrewRichie Bisset Guest
-
Rob Dillon #5
Re: identifying text members via lingo.
on resetTextMembers
thisManyCasts = the number of castLibs
repeat with i = 1 to thisManyCasts
thisManyMembers = the number of members of castLib i
repeat with j = 1 to thisManyMembers
if member(j,i).type = #text or member(j,i).type = #field then
member(j,i).scrollTop = 0
end if
end repeat
end repeat
end
To speed up the process:
1. if you segregate all of your text and field members into one cast
then you only have to loop through that one cast.
2. if you only use text members or only field members then you don't
have to test for the other member type.
--
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
-
Richie Bisset #6
Re: identifying text members via lingo.
thanks rob,
Andrew Morton had already supplied some code, but thanks for the
optimisation tips.
I had stuck to text members anyway, i generally only use fields for
editable text anyway. I've now moved all of them into one cast and i'm
only checking that cast.
thanks again,
richie
Thanks robOn Thu, 20 Nov 2003 09:10:29 -0500, Rob Dillon
<rob@ddg-designs.com> wrote:
>on resetTextMembers
> thisManyCasts = the number of castLibs
> repeat with i = 1 to thisManyCasts
> thisManyMembers = the number of members of castLib i
> repeat with j = 1 to thisManyMembers
> if member(j,i).type = #text or member(j,i).type = #field then
> member(j,i).scrollTop = 0
> end if
> end repeat
> end repeat
>end
>
>
>To speed up the process:
>1. if you segregate all of your text and field members into one cast
>then you only have to loop through that one cast.
>
>2. if you only use text members or only field members then you don't
>have to test for the other member type.Richie Bisset Guest



Reply With Quote

