identifying text members via lingo.

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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
    2. 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...
    3. 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...
    4. 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...
    5. [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...
  3. #2

    Default 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,
    >>
    >> richie
    >
    Richie Bisset Guest

  4. #3

    Default 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

  5. #4

    Default 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
    >
    >Andrew
    Richie Bisset Guest

  6. #5

    Default 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

  7. #6

    Default 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139